title: Left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
body: <p>I have a the following code which i am trying to use to initialize a variable and perform some operation on it. </p>
  
  <pre><code>let formattedPointsValue: String?
  self.formattedPointsValue = model.pointUnitsEarned.stringValueWithWhiteSpaceThousandSeperator()+" "+"model.name".localized(in: .name) ?? .none
  </code></pre>
  
  <p>However i am getting the warning</p>
  
  <blockquote>
    <p>Left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used.</p>
  </blockquote>
  
  <p>When i remove the <code>?? .none</code> my projects runs fine without a problem however when i run my unit tests i get an error</p>
  
  <blockquote>
    <p>fatal error: unexpectedly found nil while unwrapping an Optional value</p>
  </blockquote>
  
  <p>The only way i found to solve this is to use this code. </p>
  
  <pre><code>if let unformattedValue = model.pointUnitsEarned {
      self.formattedPointsValue = unformattedValue.stringValueWithWhiteSpaceThousandSeperator()+" "+"model.name".localized(in: .name)
  } else {
      self.formattedPointsValue = nil
  }
  </code></pre>
  
  <p>I would like to understand why something like this works:</p>
  
  <pre><code>let legend: String?
  self.legend = model.pointsCategory ?? .none
  </code></pre>
  
  <p>but this fails: </p>
  
  <pre><code>let formattedPointsValue: String?
  self.formattedPointsValue = model.pointUnitsEarned.stringValueWithWhiteSpaceThousandSeperator()+" "+"model.name".localized(in: .name) ?? .none
  </code></pre>