check if buffer is equal to b"", not ""