The homeowner does have the right to pose the question by filing an affirmative defense. There are a good dozen or so affirmative defenses that might apply. The problem is that most home loans contain clauses that will burden the losing party to the legal fees of the prevailing party. So even if you try to do it yourself without an attorney, you’ll end up paying the lenders legal fees. And except in very extraordinary circumstances you will lose.
The California non-judicial foreclosure process is not sympathetic (or at least so far has not proven to be sympathetic) to standings claims.