Implemented createOrReplaceType