This needs a separate null check and PyErr_Clear