Allow empty JSON array as valid input

Because MW PHP API stuff does that for an empty dataset, and
it's easier to be compatible here than fix it there.

https://bugzilla.wikimedia.org/show_bug.cgi?id=10887

Change-Id: I1a4b031ebc377c457939d9fa9454a4a75ad20ceb