Fix null pointer exceptions in methods that expect to be able to get a token
Correct output when the token is null.
Merge branch 'dev' of github.com:intermine/intermine into dev