value = getDatastoreToPojoTypeFunc(Utils.identity(), ammd.getType()).apply(value);
} else if (value instanceof String) {
TypeConverter conv = typeMgr.getTypeConverterForType(ammd.getType(), String.class);
if (conv != null) {
// Persisted as String, so convert back
value = conv.toMemberType((String)value);
}
} else if (value instanceof Long) {
TypeConverter conv = typeMgr.getTypeConverterForType(ammd.getType(), Long.class);
if (conv != null) {
// Persisted as Long, so convert back