Typescript Check If Integer Is Palindrome Function