Optimize isObject and use in bind