fix that avoid NPE while processing token string