Fix 34532

Added a check if encodingType is null to allow it to retrieve the default
encoding.
Merge pull request #159 from slide/master

Fix 34532