if (null == ce()) {
if (ce() == null) {
    private void changeMode() {        int wn = clientgui.mechD.wPan.getSelectedWeaponNum();        // Do nothing we have no unit selected.        if (null == ce()) {            return;        }        // If the weapon does not have modes, just exit.        Mounted m = ce().getEquipment(wn);        if (m == null || !m.getType().hasModes()) {            return;        }        // send change to the server        int nMode = m.switchMode();        client.sendModeChange(cen, wn, nMode);        // notify the player        if (m.getType().hasInstantModeSwitch()) {            clientgui.systemMessage(Messages.getString("FiringDisplay.switched", new Object[]{m.getName(), m.curMode().getDisplayableName()})); //$NON-NLS-1$        } else {            clientgui.systemMessage(Messages.getString("FiringDisplay.willSwitch", new Object[]{m.getName(), m.pendingMode().getDisplayableName()})); //$NON-NLS-1$        }        updateTarget();        clientgui.mechD.wPan.displayMech(ce());        clientgui.mechD.wPan.selectWeapon(wn);    }