The director of “Being the Ricardos” is pushing back on criticism of the film’s casting.

Speaking to the Times of London, Aaron Sorkin responded to complaints about casting Spanish actor Javier Bardem in the role of Cuban entertainer Desi Arnaz.

READ MORE: Nicole Kidman Took Up Smoking For Lucille Ball Role In ‘Being The Ricardos’

Sorkin likened the criticism to people asserting that only gay actors should be cast in gay roles.

“You can act being attracted to someone, but can’t act gay or straight. So this notion that only gay actors should play gay characters? That only a Cuban actor should play Desi?” he said. “Honestly, I think it’s the mother of all empty gestures and a bad idea.”

He added, “It’s heartbreaking, and a little chilling to see members of the artistic community resegregating ourselves.”

Last week, in an interview with The Hollywood Reporter, Javier Bardem also pushed back on the criticism of his casting, stating, “I’m an actor, and that’s what I do for a living: try to be people that I’m not.”

READ MORE: Javier Bardem & Nicole Kidman Talk Casting Criticism And Almost Backing Out Of ‘Being The Ricardos’

He went on to say, “What do we do with Marlon Brando playing Vito Corleone [in ‘The Godfather’]? What do we do with Margaret Thatcher played by Meryl Streep [in ‘The Iron Lady’]? Daniel Day-Lewis playing Lincoln? Why does this conversation happen with people with accents? ‘You have your accent. That’s where you belong.’ That’s tricky.”

Bardem did also add, “I do recognize that there are many underrepresented voices and stories that need to be told, and we should collectively do better to provide access and opportunities for more American Latino stories and storytellers.”