How to check for boolean state?

See here: