Some assertion refactoring.