title: How can I determine that an object is "custom" in Javascript?
body: <p>To clarify my title, I need a way to determine that an object is not a String, Number, Boolean, or any other predefined JavaScript object. One method that comes to mind is this:</p>
  
  <pre><code>if(!typeof myCustomObj == "string" &amp;&amp; !typeof myCustomObj  == "number" &amp;&amp; !typeof myCustomObj == "boolean") {
  </code></pre>
  
  <p>I could check to see if <code>myCustomObj</code> is an object, like this:</p>
  
  <pre><code>if(typeof myCustomObj == "object") {
  </code></pre>
  
  <p>This only works for primitive values, though, as this <code>typeof new String("hello world") == "object")</code> is true.</p>
  
  <p>What is a reliable way to determine whether or not an object is <strong>not</strong> a predefined JavaScript object?</p>