Standardize is_array check in Database::upsert

Change-Id: I81c7ff2cf6a1f5fe0a2a6cdad1dd26d746e17c10