Former Mayor Rudy Giuliani came to the defense of Donald Trump Sunday morning, following a New York Times report that suggested it was possible the Republican presidential nominee hasn’t paid federal income taxes for up to 18 years.

Speaking with CNN’s Jake Tapper on “State of the Union,” Giuliani called Trump “a genius” for avoiding paying taxes in a legal way.

“The reality is this is part of our tax code. The man’s a genius,” Giuliani said. “He knows how to operate the tax code to the benefit of the people he’s serving.”

Giuliani said it’s the law, not Trump who is to blame.

“Very large businesses very often take advantage of these kinds of laws,” he said. “… It would have been insane for him not to take advantage of it.”

According to the New York Times report, Trump declared a $916 million loss on his 1995 income tax returns and the large tax deduction may have allowed him to legally avoid paying federal income taxes for up to 18 years.

The Times said that although Trump’s taxable income in subsequent years is as yet unknown, a $916 million loss in 1995 would have been large enough to wipe out more than $50 million a year in taxable income over 18 years.

In response, the Trump campaign released a statement accusing the Times of obtaining the documents illegally.

“The only news here is that the more than 20-year-old alleged tax document was illegally obtained, a further demonstration that the New York Times, like establishment media in general, is an extension of the Clinton Campaign, the Democratic Party and their global special interests,” the statement said.