Added try/except TypeError to commands.py