Handle exception when min or max date is nil