From a letter of Tolkien’s to Sir Stanley Unwin dated 31 July 1947 (written in response to comments made by Rayner Unwin):
I cannot bear funny books or plays myself, I mean those that set out to be all comic; but it seems to me that in real life, as here, it is precisely against the darkness of the world that comedy arises, and is best when that is not hidden. Evidently I have managed to make the horror really horrible, and that is a great comfort: for every romance that takes things seriously must have a warp of fear and horror, if however remotely or representatively it is to resemble reality, and not be there merest escapism. But I have failed if it does not seem possible that mere mundane hobbits could cope with such things. I think that there is no horror conceivable that such creatures cannot surmount, by grace (here appearing in mythological forms) combined with a refusal of their nature and reason at the last pinch to compromise or submit.
Which then brings Tolkien to the question that has haunted his work from the beginning: is it allegory?
There is a ‘moral’, I suppose, in any tale worth telling. But that is not the same thing. Even the struggle between darkness and light (as he calls it, not me) is for me just a particular phase of history, one example of its pattern, perhaps, but not The Pattern; and the actors are individuals- they each, of course, contain universals, or they would not live at all, but they never represent them as such.
Of course, Allegory and Story converge, meeting somewhere in Truth. So that the only perfectly consistent allegory is a real life; and the only fully intelligible story is an allegory.