Null pointer exception in LoadFileStringType

Correction copied from LoadFileType.