type assertion check for time string