The only two places in your code snippet that do a pointer dereference are r.Cookie() and si.Value. If err is nil, then si should not be nil, and thus si.Value should be a valid dereference.
Hence I would assume that the nil pointer dereference already happens at r.Cookie().
So the first thing I would check is if r can become nil at any point before the given code snippet.
I would add something like
fmt.Println(r)
before the call to r.Cookie() and also
fmt.Println(si, err)
after CheckErr(), to verify if all values are as expected.