Array.isArray cannot be used since we work on Uint8Array also

Change-Id: I93fe73847f62644b7388f7353326c4098a9b9234