The angular.isElement
returns true if the argument passed to it is a DOM Element or a jQuery wrapped Element.
angular.isElement(elem)
This function is useful to type check if a passed argument is an element before being processed as such.
Examples:
angular.isElement(document.querySelector("body"))
// true
angular.isElement(document.querySelector("#some_id"))
// false if "some_id" is not using as an id inside the selected DOM
angular.isElement("<div></div>")
// false