Make sure we know the type of entities during serialization