code: boolean expectObject(Node n, JSType type, String msg) {
      if (!type.matchesObjectContext()) {
        mismatch(n, msg, type, OBJECT_TYPE);
        return false;
      }
      return true;
    }
docs: 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.
  
  @return True if there was no warning, false if there was a mismatch.