Update lib/types/Object.js

optimize toObject by inlining "Type(V)" emulation
beautified
fixed merge conflict