Added a NULL check to avl_find

This fixes a segfault in avl_find if a node is not found.