If you hold silly generalizations/prejudices about various races/nationalities as a whole, then while I think it's pretty stupid, that's just your dumb opinion and you can be morally sound and not a dickhead
If you start using those opinions to go down the road of judging and treating individuals worse based on their race/nationality, then yeah you're probably not the greatest person