Bug ArrayIndexOutOfBoundsException workaround - added check of empty array in GetNextAlarmTime