Fix VGDML middleware check for whitespace
When not validating input against the XML schema, text and comment nodes
remain in the DOM. This could result in DOMNode
that were not
DOMElement
instances, leading to a crash in the whitespace check.
Since only the whitespace/comment nodes are not elements, we can
eliminate the whitespace check more effectively.