Improve check for empty message

Signed-off-by: Michal Čihař <michal@cihar.com>
The DBI->getError is no longer called twice

Signed-off-by: Michal Čihař <michal@cihar.com>