But the state of your Item is not null, the void condition for java. It’s never ever null.
Your Item exists, and just as it has a name property, it has a valid state property.
New born Items are created with a state of NULL. That can’t be cast as a number.
Note also that any Item can also be given the state UNDEF by rule or binding.
Recent discussion -