Cast always fails even though the object is a child of the the thing I am casting to.

How would I fix this?