boolean expectObject ( Node n , JSType type , String msg ) { if ( ! type . matchesObjectContext ( ) ) { mismatch ( n , msg , type , OBJECT_TYPE ) ; return false ; } return true ; }
Expect the type to be an object or a type convertible to object . If the expectation is not met issue a warning at the provided node s source code position .