Will Smith speaks at a press conference in Dubai, United Arab Emirates, on Sunday, Aug. 7, 2016. The American actor is in Dubai to promote the film "Suicide Squad." (AP Photo/Adam Schreck)

DUBAI, United Arab Emirates (AP) — Will Smith was in the Middle East on Sunday promoting the movie “Suicide Squad”, but the Hollywood star said his time in Dubai is also a chance to counter an increasingly anti-Muslim climate surrounding the U.S. presidential race.

Smith, who plays the sharpshooter Deadshot in the film, said he’s having fun and tweeting pictures of his time in Dubai, showing that “Hey, it doesn’t look like they hate me, does it?”

“In terms of Islamophobia in America, for me that’s why it’s important to show up,” he said.

He encouraged local film makers and producers to find more ways to tell the story of the region to the world.

“The Middle East can’t allow Fox News to be the arbiter of the imagery, you know. So cinema is a huge way to be able to deliver the truth of the soul of a place to a global audience,” he said.

Smith also spoke about the upcoming U.S. presidential elections, saying he believes it’s important “to speak out about the insanity” surrounding the race.

Earlier in his campaign, Republican presidential nominee Donald Trump said he would temporarily ban Muslims from entering the United States, sparking outcry particularly in Dubai, where Trump has lent his name to several high-profile real estate projects.

“As painful as it is to hear Donald Trump talk and as embarrassing as it is as an American to hear him talk, I think it’s good,” Smith said. “We get to know who people are and now we get to cleanse it out of our country.”

Smith has similarly been vocal about issues of race and discrimination in Hollywood. Smith and his wife Jada Pinkett Smith boycotted this year’s Oscar ceremony in protest against two straight years of all-white acting nominees. The boycott by the couple and other prominent black actors prompted the film academy to promise it would double the number of female and minority members and diversify its leadership.

He said Sunday he believes it’s his responsibility to create an impression with people “where when they see a black man, the energy that we had can be what they remember.”

“They have to know that your black skin won’t hurt them,” he said, recalling advice he’d received years ago from the late South African leader Nelson Mandela.

Though the movie “Suicide Squad” is geared to become Smith’s highest-grossing film at the box office, it has been pummeled by critics. The film is the next step in the DC Comics and Warner Bros. expanded universe and cost around $175 million to produce.

Smith acknowledged that some of his movies might be critically acclaimed and others might be box-office hits, and some will just be flops like the 1999 action-comedy “Wild Wild West.”

“I feel like at this point in my career I’ve earned the right to fail,” he said.