How do I make it sense that it is not colliding with a certain object.

How do I make it sense that it is not colliding with a certain object. I’m trying to make it so that whenever it is not colliding with a certain block it will stop my character.

check enable collisions