Fixed #169 - Server crash

No need for the first typeof check here, just `if(tokenIndex > -1){` is fine.