Fix GH-14652: segfault on node without document. (#14653) do not bother trying to clone the inner document if there is none to begin with.