I have a Typescript class method (using the DefinitelyTyped JQuery definitions) that I want to look like this:

```
  DoStuff(data: JQuery | string) {
    if (data instanceof JQuery) 
      DoThis()
    else
      DoThat(); 
  }

```

But the `instanceof` line gives the error: `'JQuery' only refers to a type, but is being used as a value here.`

What's the right way of doing this? I could obviously use `typeof(data) != "string"` but that feels like cheating.