Nothing in this chapter 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 which it owns or operates for other than
a commercial purpose to persons of the same religion or from giving
preference to such persons, unless membership in such religion is
restricted on account of race, color, sex or national origin; nor
shall anything in this chapter prohibit a private club not in fact
open to the public which, as an incident to its primary purpose or
purposes, provides lodgings which it owns or operates for other than
a commercial purpose, from limiting the rental of occupancy of such
lodgings to its members or from giving preference to its members.