replace typeof check in isArrayLike