Okay checked the wrapper.py code and if no file in the manifest has the correct mimetype for the ncx ("application/x-dtbncx+xml"), it will return a python None, not a empty string. And this case of no ncx is already properly handled when rebuilding the spine attributes.
So to detect if an epub3 has an ncx or not, you can check the return value against None.
Code:
def gettocid(self):
for id in self.id_to_mime:
mime = self.id_to_mime[id]
if mime == "application/x-dtbncx+xml":
return id
return None