The assert should only be triggered when assigning a pointer, and not simply when checking the pointer.