Skip nil values in dates array