Typecheck constructor

It's easy to mistakenly pass the initial response from getToken to the constructor, which doesn't work right. Throw an exception if this happens.