Added type checking helper functions

- Types.check compares two Types.t instances
- test_types exercises Types.check