title: Check whether Swift object is an instance of a given metatype
body: <p>I need to keep a collection of Swift metatypes and write a function which will check if a given object is an instance of one of them. I can do that easily in Java:</p>
  
  <pre><code>Class c = x.getClass();
  c.isInstance(someObj)
  </code></pre>
  
  <p>However, I have no idea how to do that in Swift:</p>
  
  <pre><code>var isInt = 7 is Int.Type // compiles
  
  let x = Int.self
  var isInt = 7 is x // compiler error - Use of undeclared type 'x'
  </code></pre>
  
  <p>Is this even possible to be done in Swift?</p>