minor change: rewrote if statement as ternary operator
separated TypeCheckerTest into more specific test cases