title: The operator != is undefined for the argument type(s) long, null
body: <p>I am beginner android developer, and this is my first project. I should have to display selected data from ListView on ViewData.java to ListView on EntryTO.java. First, I get an error nullPointerException. I try to detect where is the problem with if function. and that error appears. "The operator != is undefined for the argument type(s) long, null"</p>
  
  <p>This is the code when I try to get data from listview ViewData.java</p>
  
  <pre><code>ListView lv = (ListView) findViewById(android.R.id.list);
            lv.setOnItemClickListener(new AdapterView.OnItemClickListener(){
            @Override
            public void onItemClick(final AdapterView&lt;?&gt; adapter, View v, int pos, final long id) {
            final Dialog dialog = new Dialog(ViewData.this);
            dialog.setContentView(R.layout.dialog_view);
            dialog.setTitle("Masukkan Qty");
            dialog.show();
            final product b = (product) getListAdapter().getItem(pos);
            edtqty = (EditText) dialog.findViewById(R.id.edtqty);
            buttonok = (Button) dialog.findViewById(R.id.buttonok);
            buttonok.setOnClickListener(new OnClickListener(){
                @Override
                public void onClick(View v) {
                switchToEdit(b.getId());
                Toast.makeText(ViewData.this, "Ambil product\n"+ b.getId() +"\n"+ b.getname() +"\n"+ b.getbrand()
                + edtqty.getText().toString(), Toast.LENGTH_LONG).show();
                dialog.dismiss();
                     };
               });
            }
        });
    public void switchToEdit(long id){
        product b = dataSource.getproduct(id);
        Intent i = new Intent(this, EntryTO.class);
        Bundle bun = new Bundle();
  
        bun.putLong("id", b.getId());
        bun.putString("brand", b.getbrand());
        bun.putString("qty",edtqty.getText().toString());
        i.putExtras(bun);
        finale();
        startActivity(i);
    }
  </code></pre>
  
  <p>And this the code when I try to display selected data from ListView ViewData.java to another listview on EntryTO.java</p>
  
  <pre><code>      Bundle bun = null;
         if(bun.getLong("id")!=null &amp;&amp; bun.getString("brand")!=null &amp;&amp; bun.getString("qty")!=null)
         {   bun = EntryTO.this.getIntent().getExtras();
             id = bun.getLong("id");
             brand = bun.getString("brand");
             qty = bun.getString("qty");
  
             String[]array ={brand,qty};
  
             adapter = new ArrayAdapter&lt;String&gt;(EntryTO.this, 
                    R.layout.item_list,R.id.edtnama, array);
             setListAdapter(adapter);
         }
  </code></pre>
  
  <p>Please help me.</p>