You don't have to explicitly check for "true", the name and the way you're using the variable already suggest that it's a bool, and anything else would cause an error anyway. Check for true without "== true" and for false by prefixing with "!".