Convert empty string to nil for numbers