title: Is it right to use empty() function for checking an object is null?
body: <p>Say, </p>
  
  <pre><code>$obj = $this-&gt;someFunc(); // this returns an object
  
  if(empty($obj)){ 
      // suppose $obj is null, it does works correctly
  }
  </code></pre>
  
  <p>In <a href="http://php.net/manual/en/function.empty.php" rel="nofollow">http://php.net/manual/en/function.empty.php</a>, <code>empty()</code> is only used for variables and arrays.</p>
  
  <p>But, is it the correct way?</p>