Throw NullPointerException.

Inform users more explicitly about the case when XML document has no
root element.