Better type check for getDebugToken(), for authbucket/oauth2-bundle.