Throw errors in convert() for undefined, empty, or invalid XML.