Typescript If Array Length