DDF-762 Fixed NPE when unexpected token is provided.