Remove duplication in Type#retrieve