Improve check when start and end are provided but dates is NULL; add test for this

1 job for develop-Dates_periodmean
in 37 seconds, using 0 compute credits, and was queued for 2 seconds