Activist hedge fund Starboard Value might be making a mistake with its involvement in Dollar Tree, but that doesn't mean the stock's not worth buying, says CNBC's Jim Cramer.

On Jan. 7, the Wall Street Journal reported that Starboard had taken a 1.7 percent stake in Dollar Tree in the hopes of convincing management to sell the Family Dollar business. Since Dollar Tree bought Family Dollar in 2015, it has struggled to improve the division, resulting in three straight quarters of disappointing results in 2018.

As such, Starboard reportedly sees an opportunity: the firm is calling on Dollar Tree to spin off Family Dollar and demanding seven out of its 12 board seats to ensure that happens. It has also suggested reworking Dollar Tree's pricing model.

But after speaking with Dollar Tree President and CEO Gary Philbin after the company's most recent earnings report, Cramer harbored some doubts about Starboard's plans for Family Dollar.

"I think that, for once, Starboard Value may be a little off base," he said Monday on "Mad Money." "The last time Dollar Tree reported ... back in November, the whole story changed."

While the headline earnings results were still disappointing, Cramer saw a clear "silver lining": Dollar Tree's ongoing renovations of the Family Dollar stores were finally bearing fruit in the form of accelerating sales. In the post-earnings conference call, management said the renovations could result in high-single-digit same-store sales growth.

In the interview with Cramer, Dollar Tree's CEO doubled down on that sentiment. He cast Family Dollar's turnaround as "a multi-year trajectory to get to an inflection point" and said the company planned to renovate at least 1,000 stores in 2019.

"Ever since that last quarter and that interview, ... the stock's trajectory has turned around," Cramer said. Shares of Dollar Tree have gained nearly 8 percent in 2019 after falling slightly in December of last year.

"Even though Dollar Tree has run up dramatically from its lows, the stock is still down nearly $20 bucks from its highs," the "Mad Money" host said. "I think it's a bargain here."

Still, Starboard seems convinced that Dollar Tree has failed to turn the brand around. According to the activist firm, the market is valuing Family Dollar, which Dollar Tree bought for $8.5 billion, in a $1 billion to $3 billion range.

And while the "Mad Money" host liked Starboard's pricing idea — to build a multi-tiered pricing structure at Dollar Tree, similar to other discounters, instead of charging $1 for everything — he wanted to see the Family Dollar transition play out.

"[Starboard] want[s] Dollar Tree to consider cutting their losses and moving on," Cramer said. "But based on what the company just told us about the remodeling initiative when it reported, I think they have a chance to prove to Starboard that they can deliver a turnaround."

Thankfully, Cramer sees a few ways for investors to win regardless of which side gets its way.

"This could be a win-win," he said. "Either Dollar Tree pulls off the turnaround or Starboard takes some heads and ... unlocks value that way — a little more brutal. So, while I disagree with some of their points, I have to like that they're giving you multiple ways to win."

He also saw a third path: "As long as Starboard gives management some time to prove their plan can work, perhaps in exchange for a board seat or two, I bet there's more upside, and Dollar Tree? It's a buy."

Dollar Tree shares slid at the end of Monday's fairly placid trading session, settling down 0.05 percent at $97.23.

Questions for Cramer?
Call Cramer: 1-800-743-CNBC

Want to take a deep dive into Cramer's world? Hit him up!
Mad Money Twitter - Jim Cramer Twitter - Facebook - Instagram

Questions, comments, suggestions for the "Mad Money" website? madcap@cnbc.com