An act or omission of the Sheriff, the Sheriff's alternate, a sheriff's officer or any other person acting under the direction of the Sheriff or a sheriff's officer does not subject the Sheriff, Sheriff's alternate, sheriff's officer or person so acting personally to any action, liability, claim or demand if the act or omission was done, or omitted to be done, in good faith for the purpose of exercising a function under this Act or another Act.