That is a nice rationalization of Gandolf, however:
Deuteronomy 18:10-13
10 There shall not be found among you anyone who makes his son or his daughter pass through the fire, one who uses divination, one who practices witchcraft, or one who interprets omens, or a sorcerer, 11 or one who casts a spell, or a medium, or a spiritist, or one who calls up the dead. 12 For whoever does these things is detestable to the LORD; and because of these detestable things the LORD your God will drive them out before you. 13 You shall be blameless before the LORD your God. NAS
That said the Lord of the Rings trilogy is good fiction and I liked the movies.