Added condition value and changed stock variable

The added condition checks if values.step == null. If it is the funtion
will call return. The stock variable wasn't getting filled when a
variation stock was set, now it is.