Simplify if conditional