code: function (object) {
    if (typeof HTMLElement === 'object') {
      return object instanceof HTMLElement;
    } else {
      return object &&
        typeof object === 'object' &&
        'nodeType' in object &&
        object.nodeType === 1 &&
        typeof object.nodeName === 'string';
    }
  }
docs: Returns true if object is a DOM element.