update object typecheck method, no third variable required