Added checking and raising of exception if TIME_IMP_DICT is empty