Add type check to params.cookie

Confirms that params.cookie is indeed a string so that invoking
.split() later doesn't cause errors.