bool isCommentNode(Node node)

Source

bool isCommentNode(Node node) => node.nodeType == Node.COMMENT_NODE;