i think we're missing a `not`:
```
elif not isinstance(key, (unicode, str)):
```