maybe change nextIFD to hasNextIFD to make it clear that it is a boolean?