Added some functionality for type checking for Sets.