I think that is dividing $(vFcstMonths) into null which causes an error. If you want to assign different values to vFcst_Invoices depending on the condition, you may try
LET vFcst_Invoices=if(isnull($(Invoice_Every)),0,round($(vFcstMonths)/$(vInvoiced_Every)));
So when $(Invoice_Every) gets a null value, vFcst_Invoices will take 0, otherwise, round value. Is that correct?