Nokogiri_wrap_xml_syntax_error: Add a null check for error.

Addresses #1108.