Apparently {}["toString"] always exists; updated to test for isArray rather than test for existence.