Avoid setting index during migration when value is None.