Typescript Check If Variable Is String Array In Java