means— (A) the principal residence (within the meaning of section 121) of the taxpayer, and (B) 1 other residence of the taxpayer which is selected by the taxpayer for purposes of this subsection for the taxable year and which is used by the taxpayer as a residence (within the meaning of section 280A(d)(1)). (2) Married individuals filing separate returns If a married couple does not file a joint return for the taxable year— (A) such couple shall be treated as 1 taxpayer for purposes of paragraph (1), and (B) each individual shall be entitled to take into account 1 residence unless both individuals consent in writing to 1 individual taking into account the principal residence and 1 other residence. (3) Residence not rented For purposes of paragraph (1)(B), notwithstanding section 280A(d)(1), if the taxpayer does not rent a dwelling unit at any time during a taxable year, such unit may be treated as a residence for such taxable year. (4) Unenforceable security interests Indebtedness shall not fail to be treated as secured by any property solely because, under any applicable State or local homestead or other debtor protection law in effect on August 16, 1986, the security interest is ineffective or the enforceability of the security interest is restricted. (5) Special rules for estates and trusts For purposes of determining whether any interest paid or accrued by an estate or trust is qualified residence interest, any residence held by such estate or trust shall be treated as a qualified residence of such estate or trust if such estate or trust establishes that such residence is a qualified residence of a beneficiary who has a present interest in such estate or trust or an interest in the residuary of such estate or trust. (d) Coordination with deduction In the case of any taxable year beginning in calendar years 2018 through 2022, the taxpayer may elect to apply this section in lieu of the deduction under section 163 for qualified residence interest. . (b) Phaseout of deduction Section 163(h) of such Code is