title: convert String to AnyObject in swift
body: <p>I have a static string variable </p>
  
  <pre><code>struct numb {
  
      static var selectedNumber: String = String()
  
  }
  </code></pre>
  
  <p>I am trying to unwrap ( while casting it as <code>AnyObject</code>) the value and assign it to <code>messageComposeViewController</code></p>
  
  <pre><code> if let textMessageRecipients :AnyObject  =  numb.selectedNumber 
      {
       messageComposeVC.recipients = textMessageRecipients as? [AnyObject]
      messageComposeVC.body = "Testing 123!"
      }
  </code></pre>
  
  <p>the compiler is throwing an error</p>
  
  <pre><code>bound value in a conditional binding must be of Optional type
  </code></pre>
  
  <p>How do I convert my <code>string</code> to <code>AnyObject</code> and assign it to the message view controller?</p>