Check if the argument is a string which works for both Python 2 and 3.
Definition at line 42 of file spyder_shell_widget.py.