code: public static boolean isEmpty(Node node) {
          return (node == null || (node.children() != null && node.children().size() == 0));
      }
docs: Determines if a node is null, or a single parent node without children.