Additional checks for null tokens

We had a bug in our code where we were passing in a token with a value of `null`. This was causing Octonode to throw an unhandled exception. This tiny pull request just does an additional check to ensure that the token exists.