Refactored the AST checking of CheckOther::checkIncorrectLogicOperator()