Simplify building exception message

Also fixes problem with exception without message, in such case class
and message are equal