President Heber J. Grant made an applicable remark:
There is but one path of safety to the Latter-day Saints, and that is the path of duty. It is not a testimony, it is not marvelous manifestations, it is not knowing that the Gospel of Jesus Christ is true, that it is the plan of salvation, it is not actually knowing that the Savior is the Redeemer, and that Joseph Smith was His prophet, that will save you and me, but it is the keeping of the commandments of God, the living the life of a Latter-day Saint (Heber J. Grant, Conference Report, April 1915, p.82).
To the interesting list of things that will not provide safety, we might add wisdom. Solomon was the wisest of all men, "So king Solomon exceeded all the kings of the earth for riches and for wisdom. And all the earth sought to Solomon, to hear his wisdom, which God had put in his heart" (1 Kings 10:23,24).
It was a gift Solomon had sought and the Lord had provided (I Kings 3:9-11). But it did not save him, because somehow he was turned out of the path of his duty.