Write the contents of the tree builder as a tree object.
a TreeBuilder.
the OId of the created tree object or null.