More compact type testing of classes.