title: Float variable != null not working
body: <p>If (loanAmtValue!=null) is used..it throws an error ie."Operator != cannot be applied to float,null". Plzz sum1 come up with a solution to this prob.. The app crashes if no value is given in that field. So I was trying to use null condition check so that app doesn't crash even if no value is given.</p>
  
  <pre><code>public class SICalculatorActivity extends Activity implements View.OnClickListener {
  
      private Button submit;
      private  Button submit2;
      SeekBar sb;
      TextView yrs;
      EditText loanAmt;
      EditText roi;
      TextView siResult;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.sicalculator);
  
          final int years;
          sb = (SeekBar)findViewById(R.id.set_years);
          yrs = (TextView)findViewById(R.id.years);
  
          sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
  
              @Override
              public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
  
                  yrs.setText(sb.getProgress()+" year(s)");
              }
  
              @Override
              public void onStartTrackingTouch(SeekBar seekBar) {
  
              }
  
              @Override
              public void onStopTrackingTouch(SeekBar seekBar) {
  
              }
          });
  
          addButtonClickListener();
      }
  
      private void addButtonClickListener() {
  
          submit = (Button)findViewById(R.id.button);
          submit.setOnClickListener(this);
          submit2 = (Button)findViewById(R.id.button2);
          submit2.setOnClickListener(this);
  
      }
  
      @Override
      public void onClick(View view) {
          float loanAmtValue = 0;
          float roiValue = 0;
          double answer=0;
          float y = sb.getProgress();
  
          loanAmt = (EditText)findViewById(R.id.amt);
          loanAmtValue = Float.parseFloat(loanAmt.getText().toString());
          roi = (EditText)findViewById(R.id.roi);
          roiValue = Float.parseFloat(roi.getText().toString());
  
          if (loanAmtValue != null &amp;&amp; roiValue != null){
  
  
                  case R.id.button:
                      answer = (loanAmtValue * roiValue * y) / 100;
  
                      siResult = (TextView) findViewById(R.id.result);
                      siResult.setText("Simple Interest for Amount Rs." + loanAmtValue + " and ROI " + roiValue + "% for "+y+" year(s) is = " + String.format("%.2f", answer));
  
                      loanAmt.setText("0");
                      roi.setText("0");
                      break;
  
              }
  
  
          }
          else
          {
              siResult.setText("Please provide valid details");
          }
      }
  }
  </code></pre>