Add a helper assertion function.