title: Check if props is present with ternary operator
body: <p>I have a conditional statement where I'm checking if the path includes hello and buy in them then return null. (Path is getting passed to the component as props). But if path isn't getting passed I don't want the page to break. How do I write a conditional here to check if the path is available? This is what I wrote</p>
  
  <pre><code>if  path ? ((path.includes('/hello') || (path.includes('/bye')) : '') {
          return null
      } 
  </code></pre>