by_type() accepts type objects.