Added additional type check to `IdentityMetadataProcessor`