Fix bug - js error when cookie tag is null