test for HTMLElement or duck-type