title: New to JavaScript, how to do a null check?
body: <p>I am trying to learn JavaScript. First day! I want to concatenate the First and Last names. This is what I have so far. It works fine, but if I don't enter one of the fields, it just shows up as <code>null</code>. How do I avoid that? Where would I put that clause in the following code? Thanks for your help in advance!</p>
  
  <pre><code>function ShowFullName()
  {
      var varFirstName = Xrm.Page.getAttribute("lauren_firstname").getValue();
      var varLastName = Xrm.Page.getAttribute("lauren_lastname").getValue();
      Xrm.Page.getAttribute("lauren_name").setValue(varFirstName + " "  + varLastName);
  };
  </code></pre>