#196 related bug - Added guard against empty type names and type names that already exist in the collection.