Changed isDOMElement  to isHtmlElement