CLN: Change assert_(a is [not] None) to specialized forms

Work on #6175. Changes instances of assert_(a is [not] None) to specialized assertIs[Not]None(a).