Fix offsetExist if getCookie is null