In an action for false arrest or false imprisonment brought by any person by reason of having been detained for questioning on or in the immediate vicinity of the custodian of the record, it shall be a defense to such action if such person was detained in a reasonable manner and for not more than a reasonable length of time by a person authorized to make arrests or by the custodian or his agent authorized for such purpose and if reasonable grounds existed at the time of such detention to believe that such person so detained was committing or attempting to commit a violation of section one hundred and forty-five of chapter two hundred and sixty-six.
Mass. Gen. Laws ch. 231, § 94C