Avoid readData() when buffer is null.