Better duck typing in isinstance check
Merge pull request #936 from dbrgn/isinstance_iterable

Better duck typing in isinstance check