Handle case where an array is empty