check for self.account is None

Fixes http://manage.dimagi.com/default.asp?119665