C# overload method simplification
You can overload your SetUniform method with the different types of value:

public void SetUniform(int value)
{

}
public void SetUniform(Vertex2f value)
{

}
public void SetUniform(Vertex3f value)
{

}
...


You could also try using the Null Object Pattern to avoid the null checks or define some default behaviour.