Some time ago at work, I ran across code resembling the following.
Anyway, traditionally C# developers have had two ways of solving the "I want a reference to my object as an X
but I also want to handle the case where my object is not an X
" situation....