Typescript Check If Instance Of Interface In Java