dhtmlxTree find functionality

Hi, I am using the find functionality. I need to have an alert message when data is not found in the tree content?

How can I do this? What the tree.findItem… returns if no data found?

Method returns null if nothing found

if (tree.findItem(“some”)===null) alert(“not found”);