fix: ensure convertToDate() convert null date to undefined