Correctly detect if a variable is a string

`instanceof` does not work with strings that are created as literals

```javascript
"x" instanceof String
// false
typeof "x" === "string"
// true
```

(Note, it does work with strings created using the string constructor, but that's not common

```javascript
new String("x") instanceof String
// true
```
)