checking currentValue != null rather than hasInitialValue flag