add tests for term type checking