Same function, variable parameters and types with lambda
A couple of things I notice, and they are both around the if statements

I would flip the if statements around so that they are checking the positive test.  I would also put the disp on the right side of the ==.  You can eliminate the else statement, all it really does is clutters up the code.

if (System.Windows.Threading.Dispatcher.CurrentDispatcher == disp)
{
    f(arg);
    return;   
}

disp.Invoke(f, arg);