Recently, the creative team at an Interpublic Group agency wanted a second opinion on an ad they were working on. They’d cast a man of color in a general market spot, and something seemed off about the dialogue. So they called in an expert: their chief diversity officer.

“The scripting called for behavior that would have been fine for a white man or even a man of color from a different background, but it didn’t work at all for the actor’s group,” recalls Heide Gardner, CDO at IPG. “There was no intent to rely on an ugly stereotype, but that was the effect.”

It was still early in the creative process, so the team set to reworking the spot, and the agency and the client avoided a potentially offensive incident. “The ad would have been doomed because of unintentional—but nevertheless negative—stereotyping,” Gardner said.

See also: J&J’s Joaquin Duato: Diversity is ‘essential’

In the wake of viral ad fails from brands like Pepsi and Shea Moisture, ad agencies are becoming more wary of coming across as culturally insensitive—even racist or sexist—due to errant or careless missteps, even well-intentioned ones. And as part of that goal, they’ve been leveraging their inclusivity heavy hitters—chief diversity officers. The CDO role is expanding, as they’re asked to liaise directly with clients on diversity and inclusion issues or to weigh in on the work creative teams are producing, offering perspectives that a copywriter or art director steeped in the microcosm of the work might miss.

“It would be hard to find a CDO who has not been involved with and a part of creative review,” said Tiffany R. Warren,” chief diversity officer at Omnicom. “Everyone has a certain expertise, and my expertise is to develop and nurture culture. I’m not a creative per se, but I have an eye for cultural nuance.”

See also: Analysis: Gender, racial diversity among CMOs shows little sign of progress

That kind of expertise is what creative teams are looking for when they come to CDOs for feedback, said Gardner. “When our agencies do reach out, they trust there will be a diversity lens that I have more insight into. When it comes to providing insight on strategy or creative work that is focusing on key demographics or reflecting a diversity theme, CDOs—who are paying attention in particular to what’s happening in the outside world—have a valuable point of view. That’s part of what we do.”

“It’s just a heat check to make sure that the cultural messages or the inclusive words are all on point,” said Doug Melville, chief diversity officer, North America at TBWAWorldwide. He makes sure a spot is “an authentic use of a cultural trigger or trend or an authentic message that is true and not cultural appropriation.”

Ideally that check happens during and throughout the development of the work. “While I personally get looped in from time to time, I am aware that these conversations and ‘gut-checks’ are happening all along our creative process,” said Celia Berk, chief employee experience officer at J. Walter Thompson and group talent partner at WPP.

See also: How to get more women in the C-suite, according to IPG, Unilever, and AOL

Even clients are asking for input on diversity and inclusion issues, Melville said, and his role has been expanding. For the last year, he’s been communicating regularly with the Airbnb strategy team, and he’s been brought in to look at creative executions with the team from Nissan.

“We started diving in deeply with Gatorade, Nissan, now we do Intel, Apple, Principal Financial Group—companies we work with to ensure that a significant percentage of every dollar we spend on their behalf goes to a woman- or multicultural-owned, -operated and -controlled business.” Over the past 5 years, that’s amounted to $150 million with 86 businesses, for services like casting, pre- and post-production, translation, duplication and photography.

CDOs are quick to point out that they aren’t policing the ideas of in-house creatives or clients. “I’m not sitting here at IPG stamping ‘disapproved’ and sending work back, Gardner said. “I’m invited to provide my point of view and the thinking behind it. We talk about the strategy, what the goals are for the work, what issues the agency might be concerned about and what I think. In some instances it’s just a matter of tweaks. It’s really an opportunity for learning, as well as feedback.”

See also: W2O, Lagrant Foundation team up on healthcare diversity push

The onus is on the creative teams to request input from a CDO. Obviously, a C-level executive can’t sit in on every strategy meeting or brief for every piece of work for every client, so CDOs depend on the good judgment of creatives to know when they need another opinion. But CDOs can also end up acting as a line of defense much later in the process. While Gardner says she or her team are usually called in on the front end of a project, “it has also happened when they’re in the testing phase, because someone might have a concern.” At that point, she said, “it’s really a disaster check.”

When disaster does seem imminent, CDOs can step in to try to avert it, like Gardner did with the unintentionally stereotypical dialogue. Warren said she’s done the same. “I’m very much empowered to have a very strong opinion with a CCO or CEO about something that they want my eyes on,” she said. “I’ve never shied away or shirked away from being completely open and honest.”

See also: Healthcare agencies not immune to gender bias, parity issues

Far from being antagonistic, agency CDOs saw their input and advice is heeded, and welcome. “I have the credibility and respect of our agencies,” Gardner said. “So if I say to them this isn’t working or this isn’t ringing true or this might be offensive, they take me at my word. Why in the world would they proceed with something like that?”

Of course, most of the work CDOs see doesn’t need to be changed. And sometimes, CDOs get to see the fruits of their labors. “I was sitting in the back of the room looking at some new P&G work, and it’s so beautiful and it’s so nuanced. I cried,” Warren said. “To me when you get it, when you have the right collection of people, the right eyes, the right client, you can produce beautiful work.”

This story was first published in Campaign.