Why is my Toggle making Errors?

I already used the same Script for a Dropdown but after I replaced it with the Toggle, I got a Error in the Console after I check or uncheck the Toggle:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using BayatGames.SaveGameFree;

public class WRITE_VRCheckbox : MonoBehaviour
{
    // ==================== VR-Mode Checkbox ====================

    public Toggle _WriteToggle;

    private void Start()
    {

        Application.targetFrameRate = 60;

        _WriteToggle.onValueChanged.AddListener(delegate
        {
            VRActiveCheckboxSettingsValueWechselPassiert(_WriteToggle);
        });
    }



    //This here will be executed as soon the checkbox toggle is checked or unchecked:
    public void VRActiveCheckboxSettingsValueWechselPassiert(Toggle transmitter)
    {
        SaveGame.Encode = false;

        // Speichert den gewechselten Wert sofort ein:
        SaveGame.Save<bool>("meineVRActivecheckbox", _WriteToggle.isOn);




        if (transmitter.isOn)
        {
            //================================================================
            // This area is reserved for future scripts...
        }
    }
}

The code above seems reasonable. Try re-dragging the toggle into that field again and resaving the scene/prefab.

The reason: if in the past that field had been a different type (such as GameObject) and you dragged a GameObject in there, then changed the type to Toggle, without renaming it, your scene / prefab can get into this halfway-between-two things state.