Empty check for datetime field

CRM-14983 DB error fix https://issues.civicrm.org/jira/browse/CRM-14983