Division by zero error ...

Catching error if input array has no elements