don't crash on null doc_dates in pillow retry

related to http://manage.dimagi.com/default.asp?149488