In any prosecution under this chapter it is a defense that:
A. A building involved was abandoned; or
B. The premises were at the time open to members of the public and the actor complied with all lawful conditions imposed on access to or remaining in the premises; or
C. The actor reasonably believed that the owner of the premises, or other person empowered to license access thereto, would have licensed him to enter or remain.