Refactoring CheckOther::checkCharVariable() using AST