Object.isObject check is added to see whether isObject function is available