Fixed NRE condition in token validator