Separate method for token check.