Avoid some NullPointerExceptions and ClassCastExceptions found when fuzzing Apache POI This mostly only makes thrown exceptions a bit more consistent or may allow some broken documents to be still read.