don't 500 getting xml if _attachments is None

this can happen after copy_domain
Merge pull request #4879 from dimagi/null-attachments

don't 500 getting xml if _attachments is None