title: Swift: Optional Text In Optional Value
body: <p>How to remove <code>Optional("")</code> text on optional value when displaying without forcing to <code>!</code>.</p>
  
  <p><strong>Update</strong></p>
  
  <pre><code>// I have somthing like this declared outside class
  // I put question mark wrapper since I don't know when this session might have a value
  var url = "\(self.session?.apiURL)/api/products.json"
  
  // private session
  private var _session:Session?
  
  class MyClass
  {
     .
     .
     .
  
  
     // the value of apiURL depends on session, session has optional value and declared as
     // custom lazy loaded var session
     var session:Session?
     {
        get
        {  
           if _session == nil 
           {
             _session = // fetch from coredata store if there is an active session. Might return nil
  
             // if no active session
             if _session == nil
             {
                // I just print "No active session"
             }
           }
  
           // return _session may or may not contain any value
           return _session
        }
     }
  }
  </code></pre>
  
  <p>When the session has a value the <code>url</code> has a value:</p>
  
  <pre><code>Optional("my_api_url_here")/api/products.json
  </code></pre>