Add check for valid time specification.