make sure we have an array

before assuming we can get the first element