fix: removed import of StringTypes (according to the documentation they
are outdated), instead using isinstance(var, basestring)