Nothing in this part shall prohibit a religious organization, association or society, or any nonprofit institution or organization operated, supervised, or controlled by or in conjunction with a religious organization, association, or society, from limiting the sale, rental, or occupancy of dwellings that it owns or operates for other than a commercial purpose to persons of the same religion or from giving preference to those persons, unless membership in that religion is restricted on account of race, color, or national origin.