handle undefined data