don't crash if edd and dod aren't dates

http://manage.dimagi.com/default.asp?139265
Might want to say `dod is not None and ...` since other falsey values could slip through here. Presumably `None` is the only non-date value you want to allow?