Move up assertArray() check.
Passing a non-array was throwing an error about batching. The error
message provided by assertArray is more likely to help users isolate
their mistake.