Validates the provided time unit string and returns it if it is either 'MILLISECOND' or 'MICROSECOND'.
The time unit string to be validated.
The validated time unit string, or undefined if the input is falsy.
undefined
If the time unit is not 'MILLISECOND' or 'MICROSECOND'.
Validates the provided time unit string and returns it if it is either 'MILLISECOND' or 'MICROSECOND'.