contract of insurance legal definition