handling of empty array from backend