tree:

isTreelike(obj)

Returns true if the indicated object can be directly treated as an asynchronous tree.

See treelike objects for a list of types.

Note: the from method accepts any JavaScript object, but isTreelike returns false for an object that isn’t one of the above types.