Add debug assertions.