added tests for type check