Return 2 values with if condition

I have a mult function that basically multiplies a variable and a coefficient. In the main() I assign the coefficient values. I would like to know the correct way of checking if the coeff is nonzero and performing the mult accordingly.

Expr blur5sMul0(Expr x0, Expr w0){
    x0  = cast<uint16_t>(x0);
    w0 = cast<uint16_t>(w0);
    return cast<uint8_t>((w0*x0 + 8)>>4);
}

Expr accumulate(Expr bm0,Expr bm1,Expr bm2,Expr bm3,Expr bm4, Expr bm5, Expr bm6){
    return bm0+bm1+bm2+bm3+bm4+bm5+bm6;
}

 //Initialize the sparse filter weights
   uint16_t coeff[] ={1, 3, 4, 6, 4, 3, 1};

// Sparse Blur
   Func blur("blur");
   blur(x,y,c) = accumulate(
    blur5sMul0(input_bounded(x-3,y,c),coeff[0]),
    blur5sMul0(input_bounded(x-2,y,c),coeff[1]),
    blur5sMul0(input_bounded(x-1,y,c),coeff[2]),
    blur5sMul0(input_bounded(x , y,c),coeff[3]),
    blur5sMul0(input_bounded(x+1,y,c),coeff[4]),
    blur5sMul0(input_bounded(x+2,y,c),coeff[5]),
    blur5sMul0(input_bounded(x+3,y,c),coeff[6]));

Something like this gives me a compilation error:

Expr blur5sMul0(Expr x0, Expr w0){
    x0  = cast<uint16_t>(x0);
    w0 = cast<uint16_t>(w0);
    if (Expr w0==0) {return 0;}
    else {return cast<uint8_t>((w0*x0 + 8)>>4);}
}