When you run your script what happens?
For a check box, when not selected or "X" the value is the string "Off" with a length of 3 not a null string nor a length of zero.
If you want only one or none of the 2 check boxes selected, why not create an exclusionary group? That way if one box has been selected and then one selects the other box, the first box is automatically unchecked. You need to set the Export value for each check box, widget, to a unique value.
Their is only one checkbox. the "StdPitch" box is a checkbox to mark if the pitch will be the standard 4/12 and it's export value is set to "Yes". The "OtherPitch" field is just a text field, in case the salesman wants to choose a 5/12, 6/12 or other pitch roof.
Right now by default the "StdPitch" 4/12 checkbox is checked, and the "Pitch" field has 4/12 in it.
If I uncheck the 4/12 and put a value in the "OtherPitch" field the "Pitch" field stays blank.
If they both are blank, the "Pitch" field stays blank.
If either of them is filled out by its self, the "Pitch" field stays blank.
But, if they both get values, the "Pitch" field says "ERROR" like it's supposed to.
A check box will always have a value even when unchecked.
You should temporarily add some additional code to show you the values of the fields you are testing to make sure you are testing for what you think you are testing for.
Many forms have a check box group with the standard options and then one for "Other". The other unlocks a text field into which one can add a custom value. If the "Other" is not selected the text field is cleared and made read only. This approach only allows the selection of a standard value or an optional value. It is something you should consider.