title: How do I tell if a variable is a valid array key?
body: <p>I want to create a function that won't create errors if it's passed arguments that aren't valid array keys, and successfully check if the argument is set as a key in an array.</p>
  
  <pre><code>static function IsAwesome($name) {
      return isset(self::$_awesomeThings[$name]);
  }
  </code></pre>
  
  <p>This creates a lovely message when someone passes, say, an object as $name:</p>
  
  <pre><code>Warning:  Illegal offset type in isset or empty in ...
  </code></pre>
  
  <p>What's the simplest way to avoid this behavior without excluding potentially valid keys, like <code>true</code>, for example? Assume existing code that can't be changed already relies on this behavior.</p>