Use collections.Mapping/Sequence in isinstance checks