fixed bug where didn't properly catch a null value before attempting to
convert it into a date.