Ah, I see. The final decision was to consistently throw WrongClassException instead of returning null. That's ok for me.