def preprocess_channel_types(channel_types):
    """
    Preprocesses the given channel type values.
    
    Parameters
    ----------
    channel_types : `None`, `iterable` of `int`
        Channel types to limit a slash command parameter to.
    
    Returns
    -------
    processed_channel_types : `None` or `tuple` of `int`
    
    Raises
    ------
    TypeError
        If `channel_types` is neither `None` nor `iterable` of `int`.
    ValueError
        If received `channel_types` from both `type_or_choice` and `channel_types` parameters.
    """
    if (channel_types is None):
        processed_channel_types = None
    else:
        processed_channel_types = None
        
        iterator = getattr(type(channel_types), '__iter__', None)
        if (iterator is None):
            raise TypeError(f'`channel_types` is neither `None` nor `iterable`, got '
                f'{channel_types.__class__.__anme__}.')
        
        for channel_type in iterator(channel_types):
            if type(channel_type) is int:
                pass
            elif isinstance(channel_type, int):
                channel_type = int(channel_type)
            else:
                raise TypeError(f'`channel_types` may include only `int` instances, got '
                    f'{channel_type.__class__.__name__}; {channel_type!r}.')
            
            if processed_channel_types is None:
                processed_channel_types = set()
            
            processed_channel_types.add(channel_type)
    
        if processed_channel_types:
            processed_channel_types = tuple(sorted(processed_channel_types))
        else:
            processed_channel_types = None
    
    return processed_channel_types