Modified the `isObject` function to not use try/catch, and also added a `isArray` shim function

try/catch is a real perfomance killer !

do note that I did not include the test on `typeof(obj) !== "function"`
as all test cases are returning the same value with or without it