You know, it really is kinda amazing. I mean, why would an author feel the need to go out of their way to express their own hatred towards people of a certain culture/nation/race?
I set my own writing in a fantasy setting, so that there are no correlations between real world politics and so on and so forth, but more particularly in my own writing I make sure to make one thing very, very clear.
The bad guys can be anyone, and the good guys can be anyone.
Not only this, but most morality is grey. Even those who are evil can be good if viewed from a certain light, and even those who are good can be viewed as evil from a certain light. I ensure that this is the case in my writing to avoid any of these preconceptions.
For example, in my novel there are occasionally rich people who look down on the poor. However, there also exist kind rich people who wish to support the poor. This makes the statement that not all rich people are just bad. Furthermore, there are poor people who turn vengeful, and other poor people who do what is right. Yet I will say this- for every single character that I have made, they are never as simple as 'this person is good.' 'This person is bad.' There is always an underlying reason or motivation for things, whether it be basic survival, the way someone was raised, the lessons they have learned, or the pain they have suffered.