title: In objective-c, how can I tell the difference between a Class and an instance of a class?
body: <p>Let's say I have a generic pointer in objective-c. This pointer could either be a <code>Class</code> object, or it could be an <i>instance</i> of that class. Is there any way to tell the difference between the two?</p>
  
  <p>Example:</p>
  
  <pre><code>
  id pointerA = [someClass class];
  id pointerB = [[someClass alloc] init];
  
  bool pointerAIsAClass = is_this_a_Class(pointerA); // should be true
  bool pointerBIsAClass = is_this_a_Class(pointerB); // should be false
  </code></pre>
  
  <p>How would I write the <code><code>is_this_a_Class</code></code> function so that it returns the proper <code>bool</code> value?</p>
  
  <pre><code>bool is_this_a_Class(id somePointer)
  {
      // your code goes here
  }</code></pre>