title: ejs template variable is not defined on page load and errors
body: <p>I have a form submitting to an express app:</p>
  
  <pre><code>app.post('/myform', function (req, res) {
      var content = new registration(req.body);
      content.save(function(errObj){
      if(errObj){
          res.render('registration',{error: errObj});
      } else {
          res.render('thankyou');
      }
  });
  </code></pre>
  
  <p>If there are any errors in saving the form data to mongoDb I want to display those errors at the top of the form so I'm passing the error object back to the ejs template:</p>
  
  <pre><code>&lt;% if (error) { %&gt;
     &lt;li&gt;&lt;%= error %&gt;&lt;/li&gt;  
  &lt;% } %&gt;
  </code></pre>
  
  <p>But when I initially load the page and there are no errors yet (because the form has not been submitted) I'm receiving an error on the page and the form is not rendered:</p>
  
  <pre><code>error is not defined
  </code></pre>
  
  <p>How can I get around this?</p>