Logical operators with an if statement