title: Python Maya - If objectType returns "No object name specified"
body: <p>I am trying to get maya to check if the listed object is a blendshape node or not.</p>
  
  <p>This is my code:</p>
  
  <pre><code>def bake(self, *args):
      self.items["selection"] = cmds.ls(sl = True)
      self.items["shapes"] = cmds.listRelatives(self.items["selection"], ad = True)
      shapes = ()
      for i in self.items["shapes"]:
          bs = cmds.listConnections(i, type = "blendShape", exactType = True)
          if cmds.objectType(bs, isType = "blendShape"):
              print bs
  </code></pre>
  
  <p>It returns <code># Error: RuntimeError: file X:/Documents/maya/scripts\jtBakeCharacter.py line 16: No object name specified</code></p>
  
  <p>Line 16 is: <code>if cmds.objectType(bs, isType = "blendShape"):</code></p>
  
  <p>Except that I AM specifying an object name, that object name is bs .. I have printed the result of bs and it has many objects listed. Many.</p>