CLN: Change some assert_'s to specialized foms

Work on #6175 to specialize asserts. A work-in-progress.