Perhaps you are casting to the wrong object, happened a few times with me in the past, you may add a print on the cast failure.
Perhaps you are casting to the wrong object, happened a few times with me in the past, you may add a print on the cast failure.