I don't pretend to know who wrote this originally, but all of these should be shortened to:

```python
not isinstance(data, (basestring, list, tuple, dict))
```

`isinstance` will take a tuple for the second argument and make sure that the class is not one of the classes inside the tuple of classes. Do you mind fixing this up for us @Feng23 ?