Make sure API wrapper doesn't process FormData objects

Although FormData objects are unlikely to be affected, we better be
sure.

Also, changed instanceof Array to $.isArray(), as per Krinkle's
suggestion.

Change-Id: I44e244f84fab60a417f99959722eab5cad38c506
Merge "Make sure API wrapper doesn't process FormData objects"