The StartNewMission() function could fail to create a mission because self.survey could be nil. This requires checking that the mission is not nil after every call (which is not always done). However the function is usually called from within a if let survey = self.survey context to ensure that there is a survey. This would preclude the possibility of the function setting self.mission to nil, and then checking and writing an error message when the underlying problem is that there is no survey. The places with out a non-optional survey should provide a guard on survey and a "survey is undefined error message" before calling with a non-nil survey
The StartNewMission() function could fail to create a mission because self.survey could be nil. This requires checking that the mission is not nil after every call (which is not always done). However the function is usually called from within a
if let survey = self.survey
context to ensure that there is a survey. This would preclude the possibility of the function setting self.mission to nil, and then checking and writing an error message when the underlying problem is that there is no survey. The places with out a non-optional survey should provide aguard on survey
and a "survey is undefined error message" before calling with a non-nil survey