Check for valid time, return empty string otherwise.