Move tree generation check to TreeGenerator class