Add null check on last_contact.contact_date. Fixes #3645.

Add null check on last_contact.contact_date when deciding date to scheduled next event from contact date. It will fail if last_contact has null contact_date.