Check that `container` is a valid DOM element
Merge pull request #112 from spicyj/check-dom-nodetype

Check that `container` is a valid DOM element