I'm also not sure if this is the right place for this, we should be keeping our checks like this pretty lean and just return true false.

I would think that we're better off setting the cookies in the code that takes the value from this call.