Changed hasattr __iter__ check to not isinstance(result, str) for Python3 compatibility.

Removes iteration of strings in Python3.

Python 2
```python
hasattr('foo', '__iter__')
False
```

```python
not isinstance('foo', str)
False
```

Python 3
```python
hasattr('foo', '__iter__')
True
```

```python
not isinstance('foo', str)
False
```