Changed typeof HTMLElement to nodeType checkl
Merge pull request #16 from SamMorrowDrums/nodeType

Changed typeof HTMLElement to nodeType check