CLN: More work on converting assert_'s to specialized forms

Work on #6175. Tests still pass locally. A work-in-progress.
Merge pull request #6261 from bwignall/assert_6175_4

CLN: More work on converting assert_'s to specialized forms