title: How to check if instance exists if variable not existing?
body: <p>I have a button which imports a module with a class.
  The class (varClass) creates a window.</p>
  
  <p>If i click the button once again, i try this:</p>
  
  <pre><code>if var:
      var.toggleUI()
  else :
      var = varClass()
  </code></pre>
  
  <p>But var doesn' exist the first time you create the window after opening Maya. How can i get this working? </p>