helpers\MessageBuilder: convert object to it class (if __toString is not defined)