There is a big discussion in the Gemara in בבא בתרא on 15a, concerning איוב or Job. There are questions as to whether or not he was Jewish, when he lived, or did he ever live at all. Some believed that the story of Job was more of a parable with lessons to be learned.
Our Parsha, שלח, takes the opinion that איוב lived during the time of the exodus from Egypt. He was considered a great, non-Jewish leader, who died exactly when the spies were on their fateful mission.
The hint to all of this comes when Moshe tells the spies to check if היש בה עץ, are there any trees. Obviously, there were trees, but this was a hint to Iyov, who came from ארץ עוץ.
Moshe was asking if there was someone there whose years were as long as an old tree. Iyov lived to 210. Hashem kept the inhabitants distracted with Iyov’s funeral. But sadly, the spies twisted this to report that the land devours its inhabitants, as they saw funerals wherever they went.
We must always look for the positive in every situation and see how Hashem has our best and protection always in mind.