On tree polynomials of graphs