How to know if you are on the product or category page (Magento 1)

YOu want to know if you are on either the product or category page? The following code might help: