If you look at the other cases in here you'll see that they do an instanceof check before doing a cast like this, we'll want the same for hoppers.