This reduces to:

```if (!posInt.test(obj.length)) {```

So at minimum, I'd expect to just remove the extra unnecessary tests.

But the test for the length property was intentional. I'd expect this change to break tests, which assert the design intent.