Typescript If Array Not Array In Math