@noehernandez5504
On the first IF yo can validate if array is not null and is greater than zero in the same function
@noehernandez5504