Serializing the partition type when storing IdentityType instances.