That is why we need short circuit and and or in ArmA, a suggestion I made on the BI forums...
Kegety did post a workaround for xor:
if({_x}count[A, B] == 1) then {
// true
} else {
// false
};
Would the following work for your case i.e. _a and _b possibly undefined?:
if ({_x} count [_a,_b] > 0) ...