return None if self.xml is None

http://manage.dimagi.com/default.asp?61805#354324
https://www.commcarehq.org/couchlog/view/bed016f75d8efa200005034e8830638f99d34650/

I was having trouble figuring out how to reproduce this bug, however I assume that this is the correct solution to the problem.

Since I wasn't really able to test it, I would really like Danny or someone to check this out and see if he could offer some better insight