title: Check if function exists, then run it
body: <p>Is it a correct way to check existence of a function and run it if it is there?</p>
  
  <pre><code>this.functions.SomeFunction &amp;&amp; this.functions.SomeFunction();
  </code></pre>
  
  <p>I'd prefer to check as simple as</p>
  
  <pre><code>if (this.functions.SomeFunction) {this.functions.SomeFunction()}
  </code></pre>
  
  <p>but I saw the first example in the 3rd party code and wonder if it's a good practice or if it's created for some reason like that?</p>