Sorry, you are confusing nationalism with racism. For example, there is nothing racist about border security (the wall). In fact without significant border security, a nation ceases to exist.
Of course, several centuries in to the era of the nation-state as a dominant form, lots of people confuse states and nations.