title: How do I find if a variable has been defined?
body: <p>How do I find out if a variable has been defined in my Robot Framework script?  I am doing API testing, not UI testing.  I have a complex set up and tear-down sequence and, since I am interacting with multiple computers through the script, it is important to know the current state if a fatal error has occurred.  I could track what I have done with some complex set of meta variables or a variable tracking list, but I would prefer to query if a particular variable has been defined and if so take the appropriate tear-down steps.</p>
  
  <p>A simplified version is something like:</p>
  
  <pre><code>*** Test Cases ***
  Check monitor
      ${monitored}=  Connect to Monitor  ${Monitor IP Address}  ${User name}  ${password}
      ${peer connected}=  Connect to Monitor  ${Peer IP Address}  ${User name}  ${password}
      Get Information from Monitor  ${IP Address}
      Send Info to Peer   ${buffer1}
      Report back to Monitor  ${Monitor IP Address}
  </code></pre>
  
  <p>We are assuming that the tear-down closes the connections.  I want to close any connections that are open, but if I failed to open the peer connection I will close the monitor connection and fail on closing the monitor connection.</p>
  
  <p>I am trying to determine if ${peer connected} is defined.  Can I look into Robot Framework's variable storage to see if it is there (in that dictionary?)?</p>