YOu want to know if you are on either the product or category page? The following code might help:
$controllerName = $this->getRequest()->getControllerName();
$isCategoryPage = $controllerName == 'category' ? true : false;
$isProductPage = $controllerName == 'product' ? true : false;
How to know if you are on the product or category page
You want or need help implementing this solution? Maybe you did not find what you were looking for? Contact me and I will assist you with whatever Magento problem troubles you!