In some cases moved the checks into asserts, to ensure changes in the future don't cause the checks to become necessary again.
In some cases moved the checks into asserts, to ensure changes in the future don't cause the checks to become necessary again.