Question about parsing Cookie

So I have a script that parses a Cookie that gets received and write it to a txt, here is the deal not all the time that cookie is received, most of the times log looks like this:

Received Cookies:

which causes this error :
[Executing block Parse] KeyNotFoundException: System.Collections.Generic.KeyNotFoundException: The given key ‘…thecookieIwannaparse’ was not present in the dictionary.
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Submission#0.<<Initialize>>d__0.MoveNext() --- End of stack trace from previous location --- at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray1 precedingExecutors, Func2 currentExecutor, StrongBox1 exceptionHolderOpt, Func2 catchExceptionOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.Script1.RunSubmissionsAsync(ScriptExecutionState executionState, ImmutableArray1 precedingExecutors, Func2 currentExecutor, Func2 catchExceptionOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.ScriptStateTaskExtensions.CastAsync[S,T](Task1 task)
at RuriLib.Models.Debugger.ConfigDebugger.Run()

What I wanna achieve is when that cookie is not received dont parse and end condition status as the condition block before parse