If I'm on a node, inside preprocess_page(&$variables), I can check
if (isset($variables['node']) && $variables['node']->bundle() == 'my-type')
to see if I'm on a node, and a node of a certain type.
Then I can get field information with
How can I do the same thing for a taxonomy term page to know that I'm on a taxonomy term page and get the field values?