if (whoisNickname != null)
if (whoisNickname != null && toServer!=null)
    private void whois() {        String whoisNickname;        whoisNickname = JOptionPane.showInputDialog(                " Check Info of(Input nickname): ");        if (whoisNickname != null)        {            if (toServer != null)            {                parseSendToCommand("WHOIS " + whoisNickname);            }        }    }