title: Checking pointers before using? necessity and alternatives, C++ UE4
body: <p>I'm new to UE4, and I encountered the general pattern of checking each pointer before using it, for example:</p>
  
  <pre><code>AActor *pActor = getOwner(); 
  if(pActor){
     pActor-&gt;SOME_FUNCTION();
  }
  </code></pre>
  
  <p>I'm aware to the fact that crashes are awful in terms of user experience, and that it is always advised to write code with maximum robustness, but are there well-known cases in which the pattern is really useful? (for example in theoretically safe settings, such as a pointer set to <code>GetOwner()</code>).</p>
  
  <p>And if so, are there any common alternatives for this? (perhaps making use of smart pointers?)</p>
  
  <p>EDIT:
  In my question I wanted to get an answer regarding UE4 specifically, since I encountered a source relating to UE4 only, which advised me to check pointers, although I wasn't sure about its necessity and in which pattern.</p>