An agreement made before a loss occurs that the insured will not transfer any claim that might arise on the insurance policy is void.