casting TTObjectPtr when getting one from a value