9.10 CheckObjectCoercible

2010-05-04

undefined CheckObjectCoercible(input) throws TypeError

Can this argument be converted to an Object? Note that this throws a TypeError if it cannot (for undefined and null), rather than return false.

Code: (Meta Ecma)
function ToObject(input){
if (input === undefined || input === null) throw TypeError;
}