Check for empty buffer