ensure sameAs and type are unique