Performance improvement per Anthony Whitford in LANG-574. Check for isArray to short-circuit the 9 instanceof checks. Improves both non-arrays and Object[] in tests