President Donald Trump has not been shy about how he feels about the New York Attorney General’s office, but the incoming AG, Letitia James, may have made a costly error in taking a similar approach towards the 45th president.

“Donald Trump’s days of defrauding Americans are coming to an end,” James said following a New York Times report on how Trump received millions from his parents in a way that may have helped the elder Trumps avoid taxes. In addition to continuing ongoing work by the AG’s office started by her predecessors, James vowed to do more.

“We can spot a carnival barker,” James said during her acceptance speech in November. “I will shine a light into every dark corner of his real estate dealings, and every dealing.”

Comments like this may have made it tougher to accomplish this goal, however, according to former federal prosecutor Daniel Goldman.

“If there were to be a motion to dismiss because of bias, the attorney general’s office would have to show a stronger factual basis for the legal issue,” Goldman told the Times. “If there is a close call along the way, it could have an impact on the way a judge rules.” If a judge feels that James’ past comments give the appearance of “an individualized political vendetta” against the president, that could be a problem, he said. While Goldman does not think it’s likely that future criminal charges would be dismissed outright over this, he noted the importance of James and those in her new office not taking the bait set by Trump.

“Donald Trump is desperately trying to turn everything into a hyperpartisan issue, including criminal justice, Goldman warned. “It’s essential that prosecutors maintain their neutrality and an objective view of the facts and the evidence, no matter the politics involved.”

In the meantime, the New York Attorney General’s office has seen some success against Trump, with the Trump Foundation recently agreeing to dissolve following allegations that it engaged in “persistently illegal conduct.” The case against the Foundation has led to speculation that the Trump Organization—the president’s business empire—could be implicated as well.

[Image via Hot97 screengrab]