Custom filter to check if token exists