Validate type parameter
validate_type(td, type)
td
A when object.
when
type
A string, type of calendar (NULL, 'iso', 'epi' or 'time').