Fixing issue when cookie header is null