return size of 0 if json ruby value is nil