Section 34-4-19 shall not apply to a possibility of reverter or right of entry for condition broken in:
(1) Lease for a term of years;
(2) Grant, gift or devise to the state;
(3) Grant, gift or devise for public, charitable, or religious purposes;
(4) Deed to a railroad or public utility corporation;
(5) Housing restriction as set forth in § 34-39.1-3.