CLN: Change assert_([not] isinstance(a,b)) to specialized forms

Work on #6175. Changes instances of assert_([not] isinstance(a,b)) to specialized assert[Not]IsInstance(a, b).