title: Is this a good way to check for undefined values in javascript?
body: <p>I'm currently transitioning from promises to async await. And its been easier to reason about code. I just have a question on if using way to check for undefined is good. The code is being used in nodejs and checking against a database. The code goes something like this. </p>
  
  <p>Edit: I am aware that I'm supposed to catch for errors. I just got lazy here.</p>
  
  <pre><code>// This is a hypothetical function
  async function retrieveUser(userID){
    let user = await databasefetchfuction(userID);
    if(user) return user;
    return;
  }
  
  controller.getUser = async function(req,res){
   let user = await retrieveUser(req.params.userID);
   if(!user){ // Is this ok?
     return res.status(404).json();
   } 
   return res.status(200).json({ user });
  }
  </code></pre>
  
  <p>I was if doing this is fine or if I should explicitly check for undefined using <code>user === undefined</code>?</p>