The Turkish currency crisis could be a buying opportunity for investors as long as they stick to stocks that won't be contaminated by the situation, CNBC's Jim Cramer said on Monday.

"Do not buy anything that can possibly be related to Turkey, at least not at first," the Mad Money host said. "That means you do have to stay away from the banks, and not just because bears will claim they're linked with Turkey. Contagion breeds a stronger dollar and that translates into lower interest rates, which mean weaker earnings for the banks."

The Turkish lira hit a record lows on Friday and Monday after President Donald Trump announced he was doubling metal tariffs on the country. The drop in the currency led to the S&P 500 and Dow industrials slipping.

Cramer believes that the Turkish meltdown will open up more buying opportunities, similar to recent financial crises in Greece, Italy, Spain and Cyprus. The key is sticking to stocks that are dropping because of the market sell-off but don't have a stake in the Turkish crisis.

In addition to bank stocks, Cramer said that industrials can be risky because of the ongoing trade conflict.

"It isn't like Turkey obliterates those concerns," he said. "In some ways, it intensifies them. Hence the weakness in the group."

Even before Trump's tariff announcements, the Turkish economy was already under pressure, with inflation rates reaching 16 percent in July and large amounts of foreign debt. Turkish President Recep Tayyip Erdogan asked the country's citizens to exchange their gold and foreign currencies for lira.

Turkey's central bank announced on Monday it will provide liquidity to the country's banks in an attempt to ease investors' fears, but the currency hasn't completely recovered.

The lira last traded around 6.86 against the dollar.