fix the nullpointer if we have empty result from API