Update lib/types/Object.js

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