Ideas can stand for themselves, the quote can stand for itself. You don't need to take all the things Tolstoy ever said and average their badness to decide whether a quote is true. You can read it yourself and see if it resonates with how you think of things.
Similarly, if you find that the quote resonates with you, you are not on the hook as endorsing every bad thing he ever did, or stupid thing he ever said.