I did know that about Gandalf, as a matter of fact. However, I believe Tolkien's intention, when he wrote LOTR and related works, was not to write an allegory, the way Lewis did. In fact, I believe he said on multiple occasions that LOTR was not an allegory.