Allow null values in date without breaking the js.