Check If Object Is Array Typescript Compiler Vs Code