handle TypeError in parse_time