handle null data returned on error