Typescript Check If Variable Is Array