[bugfix] call chomp only if the message is not nil