Fix exception when value is empty