Imagine the following situation:

As may notice the Handler-childs and the Costumer-childs match each other. Each Handler has a method that takes a costumer.
Is there any good way true oo-ish to make sure that a Handler-implementation only takes a correponding Costumer-implementation or any childs of it?
Some examples:
Handlerwill take allCostumersHandlerAwill takeCostumerAandCustomerAAbut notCostumerBorCostumerHandlerAAwill only takeCostumerAA
I came up with some ideas:
- Make the 
Handlerimplementation check if it's aCostumerit knows - Create a dispatcher wich does the check
 
None of these seem good because always you need to hardcode the structure. If you add another subclass you need to change all logic that checks that which is quite bad.