tree:

defineds(tree)

Returns only the defined (not undefined) values in the tree.