Is there some function that I can apply to a string so that the string will return its value if the string is not equal to null or the value “00” if it is null.
var abc = myVariable.xxxx;
gives abc = "AB" if myVariable == "AB";
gives abc = "00" if myVariable == null;
Sounds like you want:
This uses the null-coalescing operator.