only iterate if we have an array