check if the message is empty or not, to prevent stack traces in the
console