Simplify if statements