human
How to check if type of a variable is string?
assistant
Here is some code to check if type of variable `s` is a string

isinstance(s, str)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.