title: Checking if Nodes are SKShapeNodes
body: <p>In my simple game, I need to remove all SKShapeNodes before the next step happens. Here is the code that I have:</p>
  
  <pre><code>for child in self.children(){
      if(child==SKShapeNode(){
          child.removeFromParent()
      }
  }
  </code></pre>
  
  <p>This does not work because Xcode does not know what to do with child's class. Xcode wants me to add </p>
  
  <pre><code>as! NSObject
  </code></pre>
  
  <p>after child to "force downcast". This also does not work. I think that this is because now, child will always be an NSObject, not an SKShapeNode.</p>
  
  <p>How do I fix this? I am sure that it is very simple but I cannot seem to fix this myself.</p>