if (m.getType().hasFlag(MiscType.F_C3I) && !m.isDestroyed()) {
if (m.getType() instanceof MiscType && m.getType().hasFlag(MiscType.F_C3I) && !m.isDestroyed()) {
    public boolean hasC3i() {        if (isShutDown()) return false;        for (Enumeration e = getEquipment(); e.hasMoreElements(); ) {            Mounted m = (Mounted)e.nextElement();            if (m.getType().hasFlag(MiscType.F_C3I) && !m.isDestroyed()) {                return true;            }        }        return false;    }