check for null term in PagedBytesEstimator.bytesPerValue()

Fixes #5326