Check used and undefined types