Confirm variable is an array before using as an array.