Force var to be a set

def _make_set(var):
    '''
    Force var to be a set
    '''
    if var is None:
        return set()
    if not isinstance(var, list):
        if isinstance(var, six.string_types):
            var = var.split()
        else:
            var = list(var)
    return set(var)