Added a condition to the TypeToVar check that specifies that the static declaration should not be a delegate