code: function isNode(val) {
    if (!isObject(val)) {
      return false;
    }
    if (isDefined(window) && isObject(window.Node)) {
      return val instanceof window.Node;
    }
    return typeof val.nodeType === 'number' && typeof val.nodeName === 'string';
  }
docs: from https://github.com/npm-dom/is-dom/blob/master/index.js