You should bail out immediately if `enumerator == NULL`.