Flatten a nested if statement.