Simplify boolean variable checks.