completed arrayToArrayList and added some error checking
completed arrayToArrayList and added some error checking