Typescript Check If Instance Of Enumerator Meaning