handle undefined json