Would you use !!ExifIFDLength or Boolean(ExifIFDLength) to make it clear that you are passing a boolean?

And do you really want ExifIFDLength here, or should it be IFD1Length instead?  I never understood how the next pointer worked.