selectbox doesn't work when selected value is equal to zero

When the selected value is zero, the selectbox doesn't work properly. If condition changed in order to avoid weird behaves with value equals to zero.