Yes, it's am affirmative defense to an eviction suit, but it might only be temporary. Landlords are required to register each rent-controlled unit, otherwise they can't collect rent and you could refuse payment [LAMC 151.09(F)].
But once the unit is registered, you have to pay the rent.
Disclaimer: Please note that this answer does not constitute legal advice, and should not be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue. This answer does not create an attorney-client relationship.