Defense Secretary Jim Mattis on Thursday emphasized the value of certain aspects of the Iran nuclear agreement, even as President Donald Trump considers pulling out of the 2015 deal, which he has attacked repeatedly and this week called “insane.”

Without explicitly giving his opinion about whether the United States should stick with the agreement, Mattis said that after reading the full text of the deal three times, he was struck by provisions that allow for international verification of Iran’s compliance. He said that since becoming defense secretary in January 2017, he also has read what he called a classified protocol in the agreement.

“I will say it is written almost with an assumption that Iran would try to cheat,” he said in testimony before the Senate Armed Services Committee. “So the verification, what is in there, is actually pretty robust as far as our intrusive ability to get in” with representatives of the International Atomic Energy Agency to check on compliance.

“Whether that is sufficient I think is a valid question,” he said after Sen. Dan Sullivan, R-Alaska, said the nuclear deal was not supported by the Congress. The committee’s senior Democrat, Sen. Jack Reed of Rhode Island, told Mattis the Iran deal is “working as intended” and that withdrawing would ease Iran’s path to nuclear weapons.

Mattis said Iran’s history of hiding a nuclear weapons program makes it “suspect,” and he noted his concern about other Iranian activities, including its role in supporting Syria’s president, Bashar Assad, and supplying its proxy forces in Yemen.

The Pentagon chief said the administration was still considering whether the nuclear deal can be improved enough to persuade Trump it is worth preserving. “It’s going on today as we speak,” he said of the consultations. Trump has said he will decide by May 12.

Mattis reiterated his view that the deal is “imperfect” and said “there are obviously aspects of the agreement that can be improved upon.”

The question being discussed within the administration, and between the U.S. and its European allies, he said, is “whether we can repair it enough to stay in it or if the president is going to decide to withdraw from it.” He said Trump has not yet made a decision.

After meeting with Trump at the White House this week, French President Emmanuel Macron made clear that France would not follow the U.S. lead if Trump decides to withdraw from the agreement.

“We signed it at the initiative of the United States. We signed it, both the United States and France,” Macron said Wednesday. “That is why we cannot say we should get rid of it like that.”

Macron later told French reporters that he has no “inside information” on Trump’s decision on the Iran deal but noted that it’s clear the U.S. president “is not very much eager to defend it.”

Iran’s president on Wednesday ruled out any changes or additions to the accord.

Mattis in the past has said he believes the agreement is flawed but that the U.S. should stick with it.

He also addressed a point made by others — that withdrawing would undermine U.S. leverage and credibility in coming talks with North Korea about eliminating its nuclear weapons. Mattis said he does not see this as the most important consideration with Iran, given that North Korea’s leader, Kim Jong Un, has been consistently unreliable in honoring any agreement.

“In light of Kim’s family and himself breaking every international treaty, every agreement, they’ve ever made” — whether with South Korea or the United States — “I’m less concerned with that ripple effect right now,” Mattis said.

“I think we need to focus on what is in the best interest of Middle East stability and the threat that Iran poses” with its potential to resume a nuclear weapons program, he said. In this context, he said, the administration has to weigh the impacts on Middle East stability if the Iran agreement “does not get extended and maintain the verification — intrusive verification — that we need.”