NXP-15510: Fix NPE when serializing to json a document model without a parent