How do detect if not holding an item

I am trying to detect when I am not holding a custom item to reset a score. Is there a way to detect when it is not in the mainhand?

Continue to help post