title: How can I check if object is of custom type in typescript?
body: <p>I looked everywhere and couldn't find any way to check if a given object is of some custom type or not.
  For example, I declare type Human as such:</p>
  <p><code>type A = { name: string; age: number; }</code></p>
  <p>Then I want to have a function that will receive an object and decided whether it's of type Human or not. Something like:</p>
  <p><code>isOfTypeHuman = (input) =&gt; typeof input === Human</code></p>
  <p>I have a feeling it's impossible, but I thought maybe I'm missing something.
  Any ideas?</p>