Dont crash when you dont have an XML writer