For some reason I don’t know, Unity does not like to compare material instances with assigned materials. Instead you can compare the shared material to the assigned material.
if (pizzaRend.sharedMaterial == uDoughMat) {
You could also use bools to check whether your object has the right material assigned.
//Assign the material
pizzaRend.material = uDoughMat;
doughMat = true;
bakedMat = false;
//Check the bools
if (doughMat) //Do whatever
else if (bakedMat) //Do whatever