         "#{k}: #{inspect content[k], showHidden, depth-1, opts}"
 
     contentString = properties.join ', '
+  else if hasContentForInspect and not content?
+    # explicit alternate content that is null/undefined gets an empty string
+    contentString = ''
   else
     # otherwise do a full inspect call on it
     contentString = inspect content, showHidden, depth-1, opts

  return style 'shell', object.toString(), opts if depth < 0

  # allow the object to override the thing we display as its content
  content = object.contentForInspect?()

  # if it's a simple object then just enumerate the properties
  if not content or content.constructor?.name in ['Object', null, undefined]
    content ||= object

    properties = for own k of content
      getter = content.__lookupGetter__? k
      setter = content.__lookupSetter__? k

# a terminal.
#

ELEMENTS = []
ELEMENTS.push Element if Element?
ELEMENTS.push HTMLElement if HTMLElement?
ELEMENTS.push XULElement if XULElement?

inspect = (object, showHidden=off, depth=2, opts={}) ->
  opts.color    ?= off
  opts.sanitize ?= type.isTainted object
