How can I code a selected filter on a collection page?

Hello! Does anyone how to code: if filter is selected? E.g. if any filter on collection page is selected, then do this. Image below of what I mean:

I’ve tried: if collection.current_tags, but doesn’t seem to work.