ensure that list is an array