Fixed some error when handling non-xml datastreams, or just datastreams who does not want to respond to 'to_xml'.