In practice, if you just add a month to the date, you will not get the nil value.
However, you can get the nil value in some degenerative situations. For example, if you use the Islamic calendar and add -9,999,999 years, you will get nil (although, which is curious, but not in other calendars). Other calendars often overflow / end the year in these extreme situations (even if you expect them to return nil , given the documentation you provided).
Personally, I suspect that there are currently very few situations where you get nil values. I tried all kinds of extreme values, and the Islamic calendar was the only one that I managed to get the value of nil . However, this does not mean that Apple may not add a more robust logic for checking dates in the future. We will probably have to get advice from Apple (or see the source code for NSCalendar ) to finally answer this question.
So, on the bottom line, I would suggest keeping your guard statement, but it is unlikely to fail in real-world scenarios.
source share