diff --git a/pyshortcuts/shortcut.py b/pyshortcuts/shortcut.py
index 1c155cf..9429df0 100644
--- a/pyshortcuts/shortcut.py
+++ b/pyshortcuts/shortcut.py
@@ -62,6 +62,9 @@ def shortcut(script, userfolders, name=None, description=None, folder=None,
     """
     from . import platform, scut_ext, ico_ext
 
+    if not isinstance(script, str) or len(script) < 1:
+        raise ValueError("`script` for shortcut must be a non-zero length string")
+
     words = script.split(' ', 1)
     if len(words) < 2:
         words.append('')

AttributeError crash if shortcut cmd is undefined
If one tries to create a shortcut with an empty cmd it fails with the message `AttributeError: 'NoneType' object has no attribute 'split'`. 

    cmd = shutil.which("my-script")    # not in PATH, so returns nothing
    scut = make_shortcut(cmd, name="My Script", icon=iconpath)

It could be more explicit about what's wrong. I'm not sure where's best place to put an error message, or very clear on the best practice for how.

diff --git a/tests/test_pyshortcuts.py b/tests/test_pyshortcuts.py
index abd9826..2749bb5 100644
--- a/tests/test_pyshortcuts.py
+++ b/tests/test_pyshortcuts.py
@@ -1,13 +1,21 @@
 #!/usr/bin/env python
+'''Normal test run:
+     python -m pytests
+
+   Run and see manual debug print()s:
+     python test_pyshortcuts.py
+'''
 import os
+import pytest
 from pyshortcuts import make_shortcut, platform, Shortcut, get_folders
 
-root = os.path.abspath(os.path.join(__file__, '..', '..'))
-
 folders = get_folders()
+root = os.path.abspath(os.path.join(__file__, '..', '..'))
 
 def test_shortcut():
-    print("---folders:\n Home: {}\n Desktop: {}\n StartMenu: {}\n".format(
+    '''Create a shortcut from examples dir'''
+    print('---test_shortcut()')
+    print("folders:\n Home: {}\n Desktop: {}\n StartMenu: {}\n".format(
         folders.home, folders.desktop, folders.startmenu))
 
     script = os.path.join(root, 'examples', 'console_scripts', 'timer.py') + ' -u 0.25 -t 10'
@@ -21,7 +29,23 @@ def test_shortcut():
     scut = make_shortcut(script, name='Timer', icon=icon, folder=folders.desktop)
     assert isinstance(scut, Shortcut), 'it returns a shortcut instance'
 
-    #raise err # force crash so we see manual print() debug statements
+def test_none_script():
+    '''Verify we get ValueError if cmd is None (#19)'''
+    print('---test_none_script()')
+    with pytest.raises(ValueError):
+        cmd = None
+        scut = make_shortcut(cmd, name="My Script is None")
+    print('OK')
+
+def test_empty_string_script():
+    '''Verify we get ValueError if cmd is an empty string (#19)'''
+    print('---test_empty_script()')
+    with pytest.raises(ValueError):
+        cmd = ""
+        scut = make_shortcut(cmd, name="My Script is empty string")
+    print('OK')
 
 if __name__ == '__main__':
     test_shortcut()
+    test_none_script()
+    test_empty_string_script()

pip install -e .
parse_log_pytest
pytest
pytest
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///croot/attrs_1668696182826/work
certifi @ file:///croot/certifi_1671487769961/work/certifi
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
packaging @ file:///croot/packaging_1671697413597/work
pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
-e git+https://github.com/newville/pyshortcuts.git@83caab24de4d72c96064079cfe346789e6644c1a#egg=pyshortcuts
pytest==7.1.2
six==1.17.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
typing_extensions @ file:///croot/typing_extensions_1669924550328/work
zipp @ file:///croot/zipp_1672387121353/work

name: pyshortcuts
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=22.1.0=py37h06a4308_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - importlib-metadata=4.11.3=py37h06a4308_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=22.0=py37h06a4308_0
  - pip=22.3.1=py37h06a4308_0
  - pluggy=1.0.0=py37h06a4308_1
  - py=1.11.0=pyhd3eb1b0_0
  - pytest=7.1.2=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py37h06a4308_0
  - typing_extensions=4.4.0=py37h06a4308_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - six==1.17.0
prefix: /opt/conda/envs/pyshortcuts

tests/test_pyshortcuts.py::test_none_script tests/test_pyshortcuts.py::test_empty_string_script
tests/test_pyshortcuts.py::test_shortcut
pyshortcuts/shortcut.py
pyshortcuts/shortcut.py