function _isSameNodeName(nodeName, desiredNodeNames) {
    if (!desiredNodeNames || !desiredNodeNames.length) {
      return true;
    }
    
    if (typeof(desiredNodeNames) === "string") {
      return nodeName === desiredNodeNames;
    } else {
      return wysihtml5.lang.array(desiredNodeNames).contains(nodeName);
    }
  }
Walks the dom tree from the given node up until it finds a match
Designed for optimal performance.

@param {Element} node The from which to check the parent nodes
@param {Object} matchingSet Object to match against (possible properties: nodeName, className, classRegExp)
@param {Number} [levels] How many parents should the function check up from the current node (defaults to 50)
@return {null|Element} Returns the first element that matched the desiredNodeName(s)
@example
   var listElement = wysihtml5.dom.getParentElement(document.querySelector("li"), { nodeName: ["MENU", "UL", "OL"] });
   // ... or ...
   var unorderedListElement = wysihtml5.dom.getParentElement(document.querySelector("li"), { nodeName: "UL" });
   // ... or ...
   var coloredElement = wysihtml5.dom.getParentElement(myTextNode, { nodeName: "SPAN", className: "wysiwyg-color-red", classRegExp: /wysiwyg-color-[a-z]/g });