The principle of individual rights does not mean that a nation at war can't drop a bomb on an enemy nation's city unless it first judges all persons to be killed by the bomb as individually guilty. Individual rights pertain to citizens under the jurisdiction of a government. Foreign policy has to relate to nations and populations as collective entities.
Collective judgments in immigration policy are also necessary, but they are far more benign than war judgments. I don't advocate war on any Muslim countries at this time, but I do advocate restricting the flow of immigration from Muslim countries into secular countries. A nation has a legitimate interest in conducting risk assessments on sources of immigration. Nationality is a useful indicator. Race is also a useful indicator. Those nations and those populations that tend to bring terrorism, gang rape, property crime, disease, or other threats to a country ought to be given less consideration than those that tend to be healthy, peaceful, and productive.
The introduction of Somalis tends to bring down a nation's standard of living. Japanese tend to lift it up. Call this observation "racist" if you want, but the alternatives to "racism" are either: a) willful ignorance (evasion) of the very predictable adverse effects Africans and their offspring will have on a society; or b) an acceptance of moral altruism in service of the desires of any and all foreigners no matter what the costs. U.S. immigration policy is overtly altruistic, most blatantly so in the form of its refugee resettlement program specifically for Somali Muslims on the basis not of their value, but of their troubles.
At the time Ayn Rand came to the U.S., it was the nation's policy (and had been since its inception) to favor immigration from white European countries. The U.S. (and much of Europe for the matter) is too firmly in the suicidal grip of altruism to assert any such policy of unashamed self-interest today. Sweden of all places is being introduced to rampant urban hooliganism and to such horrors as assault rape (the perpetrators of which are almost exclusively non-European) courtesy of third world immigration that the Swedes feel a moral duty to accept under the reigning ideology of political correctness.
Perhaps Japan won't succumb to this evil ideology. I have been to Japan, and the thought of it being flooded with Africans frankly horrifies me. Take a good look at what happened to Detroit after it went from 90% white to 90% black. In spite of Japan's economic woes over the past two decades, there are no Detroits anywhere in Japan, no race riots, no violent flash mobs of the sort that now plague Sweden, France, Britain, Canada, and the U.S., whose African populations are on the rise.
So in sum, sweeping statements about race are very useful in judging foreign populations from the standpoint of immigration policy and in predicting the effects of immigration on nations based on the populations from which they draw.