check cookie against null fix