simplify check if read_buffer is empty

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>