char/serial: Fix emptyness handling