PDFBOX-4122: add null check to please Sonar; added TODO to generally handle null being passed to public methods