Fix Utils cherrypick function to correctly recognize lists

Cherrypick was using the typeof() operator, which returns "object" for
both arrays and objects. instanceof is a better operator to use in this
scenario.

- replace tyeof with instanceof to determine the type of a list/object