Fixed handling of null entities in the serialisable entity.