fix bug not to include null date

fix bug not to include null date