Raise error when checking a size of a json ruby value of nil

Hi Steve,
  Please let me know what you think about the tests.
Thanks,
Beth
Please leave the newlines at the ends of files. Thank you!