Test basestring instead of str in Symbol

Also, raise TypeError instead of AssertionError on bad arguments.