Typescript Check Variable Is Array Primitive Type