fixed null cokkie string crash
added checking for zero  length for all mandatory json items