operator type checking passing tests, but if statement type checking has bug