shopify I need to check if current page is a collection page and not a single product page
<p>I am trying to check if my current page is a collection page not a single product page in some collection.</p>

<p>I mean for example if someone goes to collection page of shoes then I can check using collection.handle == 'Shoes' but if I select a product from that page then it will still give me true But I want my condition to be true on if it is collection page.
Thanks for your Help!</p>