def hasMessage(messageCollection, aSubject=None, aMessage=None) :
  """Return True if the messageCollection provided has a message
  associated with the theSubject provided. """

  if aSubject is None :
    return False

  if aSubject not in messageCollection :
    return False

  if aMessage is None :
    return True

  return aMessage in messageCollection[aSubject]