I think what you want to test here is if buffer.readableBytes() < 13