fix: check if content is Tree when determining NestedTree.root
NestedTree fixes