I am not sure if you understand how the ExifProfile constructor works. You cannot use it to read the exif profile from an image file. That constructor expects only image data. I just pushed a patch to the git repository to fix the exception. I don't understand why it sometime works and sometimes doesn't with the same file. The values should always be null but should not crash. Can you share the file so I can try to reproduce this.
Also checking 'if (exif != null)' makes no sense to me because you are using a constructor.
Also checking 'if (exif != null)' makes no sense to me because you are using a constructor.