I think context is important as well. I'm aware of history and how minorities (race, ethnicitity, gender, sexuality) haven't played many roles in popular culture. Unless race is an absolute defining trait of a character (more on that a bit later), I'm open to the various kinds of swapping. Though I was fine with Danny Rand being portrayed by a caucasian actor in the Netflix series, I was 100% supportive of Lewis Tan potentially playing the character as well. I know that minorities in media do influence those who consume these things. I also know that there's been a huge history of whitewashing characters, so non-whites portraying traditionally white roles reclaims this in a way.
At the same time, I know that the concept works the other way. Seeing one's hero who was your same race, ethnicity, gender, or sexuality altered.....it stings for anyone, white heterosexual males included. Thus, I think we should be mindful of others when making these decisions.
Actually, this topic reminds me of other controversies. For instance, I remember there was debate regarding Gemma Chan, a British woman of Chinese descent, playing a British woman in Mary Queen of Scots
Gemma said something to the effect that she feels more British than Asian and that her portrayal should work regardless of her race. For me, well.....if one is portraying actual history and trying to keep things historically accurate, I lean towards historical accuracy. Now, I'm not saying Gemma can't play this role. But I feel she's got to be very good in order to play it. At the same time, having minorities play these roles reveals interesting truths. Indeed, in Mary Queen of Scots there were a number of figures played by those of African descent. Turns out that was historically true, since a lot of the Moors and people from Africa played roles in the English court. That I wholeheartedly support.