Typescript Check If Variable Is Array A Word