Treeview, check for valid content before binding events