§ 24. Waiver agreements. No agreement or release by a volunteer firefighter, or, in the case of death, the dependents of a deceased volunteer firefighter, to waive his or her right to benefits under this chapter shall be valid, except as provided in section thirty-two of the workers' compensation law or otherwise in this chapter.