Added error handling for parseWeekToInt function.