Added nil check for dates. DHH-258