def shlex_split(s, **kwargs):
    if isinstance(s, six.string_types):
        return shlex.split(s, **kwargs)
    else:
        return s
Only split if variable is a string
dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/shlex_split