Personally, I think the second solution is the cleanest. I dont really like these "magic values" that are supposed to indicate whether the value was ever set or not. -1 is a perfectly valid retention time to have after applying a RT transformation to a map and then it just starts to become very dangerous to me and we are lucky that the compiler complains about these cases since something is clearly not quite right. 

However in this case it actually seems that not the MSSpectrum itself should keep track of whether RT is initialized but the MzMLHandler. It would probably be easiest to add a boolean member to the MzMLHandler that tracks whether the RT was set or not. Depending on this, one could act appropriately.