Check element in tree