title: Puppet how to tell if a variable is set
body: <p>In a puppet class how should I test if a variable has been set or not?  Right now I am just checking if a variable is undefined:</p>
  
  <pre><code>if $http_port != undef {
    $run_command = "$run_command --http-port $http_port"
  }
  </code></pre>
  
  <p>Is there a better way to check if a variable has been declared or not?</p>