"Shark Tank" star and financial expert Kevin O'Leary has some advice for homeowners: "The No. 1 debt you want to get rid of is pay off your mortgage," he tells CNBC Make It.

A big reason to prioritize paying off your mortgage as soon as possible is the change in tax law for 2018 means "these days, you can't write off as much as you used to," says O'Leary.

The enactment of the Tax Cuts and Jobs Act (the sweeping tax overhaul that was signed into law in 2017 ), resulted in a significant drop in the number of homeowners who are able to benefit from a mortgage tax break. In April, CNBC reported only an estimated 13.8 million taxpayers will be able to claim the mortgage-interest deduction in 2018, a 57 percent drop from the over 32.3 million in 2017.

Though there are several reasons for that, a common problem is that the new law nearly doubled the standard deduction. That matters because mortgage interest is an itemized deduction — meaning in order to use it, the total of your itemized deductions needs to be more than the amount of the standard deduction. With the new much higher standard deduction, it makes way less sense for many people to itemize.

O'Leary says paying off your mortgage quickly is especially important for young people.

"Particularly if you're starting out and you've just had your first child with your significant other, you want to pay off that mortgage. You want to get rid of that so you can start saving money and investing in your future," he says.

To do so, "Think about getting mortgages that don't have huge penalties to pay them off," O'Leary advises. "Very often you can get [a mortgage] that after a year, you can start paying off the principal on an accelerated basis."

O'Leary also says student debt is important to pay off.

"Those are the two big ones. You want to pay off that student loan, and you don't want to get stuck in too big of a mortgage because you have to pay that one off too. Pay those off as fast as you can, and your savings will start," he explains.

There is a caveat: It's important to pay off whatever debt has the highest interest rate first, which is usually credit card debt, he says. But mortgages and student loans are also critically important to pay off because they're larger sums, and often have extended terms. This means it's easy to get comfortable, which can be dangerous, according to O'Leary.

"Life is unpredictable. What happens if you're laid off or incur unexpected expenses elsewhere? Your once-manageable mortgage is suddenly going to seem not-so-manageable," O'Leary previously told CNBC Make It.

Of course, you want to think about your personal situation to decide whether paying off your mortgage early is financially feasible. And you don't want to forget about other important financial goals. For example, experts typically advise first contributing enough to your 401(k) to receive a company match, if one is available. Experts also emphasize the importance of creating an emergency savings fund of three to 12 months of expenses, depending on your situation.

O'Leary is famously known for advocating against debt (once even declaring that debt is evil). He emphasizes that his most important nugget of advice regarding debt boils down to one, simple concept.

"The top of my hit parade list advice on debt is this: Don't get any," O'Leary says. "In other words, don't spend more than you have."

Like this story? Subscribe to CNBC Make It on YouTube!

Don't miss: 'Shark Tank' star Kevin O'Leary: Making this New Year's resolution is the best thing you can do for your future

Disclosure: CNBC owns the exclusive off-network cable rights to "Shark Tank." This story has been updated.