I'd say that it makes sense to broke things up on the other order, first by type and then by id. What if you pass an integer instead of a subclass? Currently it will raise an error, while if you change the order it will just return false.