The ternary operator should be removed, as the result of the `&&` operator is already a boolean.