Fix when custom_dates was empty
Check if an array of custom dates is valid