Added validation for times.