Hello Mauricio and welcome,
You can use the isnull() function to determine whether A or B is Null and adjust accordingly.
To get around this issue, edit your calculated field like this:
If you need to test for A or B being null, then you might need to nest a few more If(Isnull... statements. Another approach is to make a field A2:
and then define the output field as:
Hope this helps,