5953 dodge npm link error

@walpurgisriot @fishyfriend @jake-miles 

This PR fixes a problem with sharing contract objects between 2 instances of the library, which can occur when using `npm link`.
It might be clearer to introduce a function isPrimitive, or isValue.