Use tree-empty-p in preference to a direct null test.