Openhab rule check for Number (-NaN) value in if statement

Hi

Does any of you know how to check for the -NaN value a Number item can have in Openhab? In a rule.

In our rule we are using this:

Var_W = (HomePlug_PowerConsumptionWeek.state as DecimalType)

Problem is that we want to give this item 0 at startup, only so the value is not -NaN. We have tried to create some if statements but all seem to fail somehow. What we have tried is like:

if(Var_W != null) {
     if (!Var_W >= 0) {
        HomePlug_PowerConsumptionWeek.postUpdate(0)
     }
  }

The first if is good, as the Var_W is not null, but the second fails… any know how to check for -NaN in openhab rule?