Make asserts and ifs more consistent.