Casting object into TTObjectBasePtr