Does it matter if you unregister a function from a delegate if it wasn't registered to begin with?

I know this is stupid code, but in some more complex code I have, it would take some sort of tracking to see if some functions are registered to events or not, before unregistering, so I'd rather not bother, if I don't have to. Anything wrong with this type of thing?

delegate void Delegate ();
Delegate DeleGator;

void Start () {DeleGator -= () => {};}

To my knowledge you get a MultiCastDelegate in C#/Mono when you use the delegate keyword. In either case you can get the invocation list and check that for your instance before removing it. With all that said, I really don't think you have to (I don't). The -= just returns the same list if the registration you are looking for is not found. It doesn't throw or any crazy thing like that. Interestingly, I think once I tried to add the same callback twice.... it worked but only removed the first one when I called -=. Consider this:

    public static void Main (string[] args)
    {
        Delegator += () =>{Console.WriteLine("1-- So it will not be null");};

        Console.WriteLine("Starting length "+ ((System.Delegate)Delegator).GetInvocationList().Length);
        Delegator -= () => {};
        Console.WriteLine("After empty unregister "+((System.Delegate)Delegator).GetInvocationList().Length);
        Delegator += () => {Console.WriteLine("2-- Yep.... it works alright.");};
        Console.WriteLine("After add "+((System.Delegate)Delegator).GetInvocationList().Length);

        Delegator();

    }

produces this output:

Starting length 1

After empty unregister 1

After add 2

So it will not be null

Yep.... it works alright.