def maybe_type(obj, class_or_tuple):
    """
    A type monid. Return transfered type of obj or None if type cannot assign to given obj.
    """
    if obj is None:
        return None
    if isinstance(obj, str) and class_or_tuple is iter:
        """Trick treat str as non-iterable."""
        return None
    try:
        transfered_obj = None
        transfered_obj = class_or_tuple(obj)
    except:
        pass
    if transfered_obj is not None:
        return transfered_obj
    else:
        try:
            return class_or_tuple(obj)
        except:
            return
