Extracts a boolean condition from an expression and puts it to the if statement.