Unify if statements