I switched to isinstance in 655012a. Also, I tinkered with `collections.Iterable`, but that doesn't work since strings are Iterable. So I just used your first suggestion.