Added yet another alternative for downcasting, which may take over the original idea.