Get term tree level

A very useful function in order to get a term’s tree level.