Changed so it validates uniqueness of metal name and type name