Within the discretion of the court, an insurer or self-insurer may be allowed an award of a reasonable sum as attorney's fee, based upon actual time expended, and all reasonable costs of suit for its defense against a person making claim against such insurer or self-insurer where such claim was fraudulent, excessive or frivolous, and such attorney's fee and all such reasonable costs of suit so awarded may be treated as an offset against any benefits due or to become due to such person.
K.S.A. 40-3111