when sets are returned, check that the class $type exists