typescript check if type matches interface