Implemented element type-checking for Set (#16)