Fix issue in 0.6.1 with core/scope.js

Typechecking added in 0.6.1 seemed to create additional PhantomJS
crashes in some cases.

Adding an additional typecheck for object seems to prevent those
crashs, but I don't know if it interferes with functionality.