fix isObject function