Refactored TypeCheckerHelper to TypeErrorFactory