If it's out-of-SOLC, they CAN sue, but you have an affirmative defense in that the debt is SOLC...but you MUST raise it in your Answer and in Court. If you don't, then they can get a judgment against you. Ditto if you simply default.
If you live where the debt is extinguished after so long--usually the same time the debt is out-of-statute--you have an absolute defense. This is referred to as a "statute of repose". If you have this working for you, you would move the Court to have the case dismissed on the basis that there is no grounds for the lawsuit to begin with (no debt to collect).