Update index.js

not all objects have hasOwnProperty, but they should still be inspectable