Check that the cookieSplit is NOT null before utilizing cookieSplit
Merge pull request #2 from jimbriam/pullrequest

That was a good pick-up. I just realised there was a broken page in one of my website due to this error. Thanks for your contribution.