avl: guard against theoretical null pointer dereference