private void sanityCheck()
{
if (PdfFont == null)
throw new NullReferenceException("`PdfFont` is null.");
if (ContentByte == null)
throw new NullReferenceException("`ContentByte` is null.");
if (Segments == null)
throw new NullReferenceException("`Segments` is null.");
if (!Segments.Any())
throw new InvalidOperationException("There is no PieChartSegment to draw.");
}