Check if the given tree is a sum tree or not