NXP-13414: test if the document parent is null before getting it