check for null toDate
for commit