Section 8A. In the prosecution of a person who is an occupant of a dwelling charged with killing or injuring one who was unlawfully in said dwelling, it shall be a defense that the occupant was in his dwelling at the time of the offense and that he acted in the reasonable belief that the person unlawfully in said dwelling was about to inflict great bodily injury or death upon said occupant or upon another person lawfully in said dwelling, and that said occupant used reasonable means to defend himself or such other person lawfully in said dwelling. There shall be no duty on said occupant to retreat from such person unlawfully in said dwelling.