Compare types instead of `Class` instances