title: Type checking a custom object in javascript
body: <p>I have the following object:</p>
  
  <pre><code>var car = {
    doors: 4
    wheels: 4
  }
  </code></pre>
  
  <p>This is used in many files, is there a way that it can be checked easily across the entire codebase?</p>
  
  <pre><code>function insertCar(car) {
    if (!isCar(car)) {
      console.log('not a car')
    }
  }
  </code></pre>