If Array Is Not Empty Typescript Enum Values Method In Javascript