added optional getting for TreeDataFrame