Remove types from a union.
Exclude<T, null | undefined>
type T = string | null | undefined; type Valid = any; // TODO