Generalize if-statements to if-expressions