Fix crash with empty calendar.
Prevent crash on trading calendar with no dates.