In all cases where at the time of the execution of a warrant issued under this division the landlord by or on whose behalf the warrant was obtained, had as against the person in possession of the land lawful right to the possession of the land, then neither such landlord, nor the landlord’s agent nor any other person acting on the landlord’s behalf, shall be a trespasser merely because of any irregularity or informality in the manner of obtaining possession under the authority of this division but the party aggrieved may, if the party thinks fit, bring an action for any such irregularity or informality.