Added check for null key in pico_tree_delete