title: Test for undefined function in Javascript
body: <p>So Safari keeps yelling at me for one specific error.</p>
  
  <p>I'm trying to use Google Maps API and call <code>map.getCenter();</code>. However sometimes, this happens before the <code>map</code> has been fully loaded.</p>
  
  <p>So instead in my function I test for an <code>undefined</code> call like this:</p>
  
  <pre><code>if (map.getCenter() != undefined)
  </code></pre>
  
  <p>But that still errors out because I guess it doesn't even like making the call just to test the if the result is <code>undefined</code> or not?</p>
  
  <p>Can I get some help here?</p>
  
  <p>Thanks!</p>