Return from method when null value is set

fixes issue where boxed values are overridden with 0