checking for tree and tree id uniqueness in conversion