Combine nested if statements.