use istype on lists/tuples

avoids catching and mistreating subclasses, such as namedtuples.