Check if input is an array

In some cases the $input value (after fromJSON conversion) is not an array, in which case the logs can fill up with php notices/errors (especially when a form has several selects/options). Added this simple check to avoid that.