Comment vérifier si ImageView contient Bitmap ou pas?

Je suis en œuvre si un ImageView a bitmap puis il doit enregistrer l'image de imageview de mémoire interne ,sinon une autre image dans la mémoire interne de l'application.
voici le code:_

 croppedImage = cropImageView.getCroppedImage();
                 croppedImageView = (ImageView) findViewById(R.id.croppedImageView);
                croppedImageView.setImageBitmap(croppedImage);@Override
    public void onClick(View v) {
        //TODO Auto-generated method stub
        switch (v.getId()) {
        case R.id.btn_save:
            counter++;
            if(croppedImageView.getDrawable() != null)
            {
                System.out.println("nullllllllllllll");

                try {
                    Bitmap photo = ((BitmapDrawable)croppedImageView.getDrawable()).getBitmap();
                    FileOutputStream mFileOutStream1 = openFileOutput("IMG" + counter + ".png", Context.MODE_PRIVATE);
                    photo.compress(CompressFormat.JPEG, 100, mFileOutStream1);} 
                catch (FileNotFoundException e) {
                    //TODO Auto-generated catch block
                    e.printStackTrace();}
                }else{
                  System.out.println("notttttnullllllllllllll");
                  try {
                     FileOutputStream mFileOutStream1 = openFileOutput("IMG" + counter + ".png", Context.MODE_PRIVATE);
                    bitmap.compress(Bitmap.CompressFormat.JPEG, 100, mFileOutStream1);
                  } catch (FileNotFoundException e) {
                    //TODO Auto-generated catch block
                    e.printStackTrace();
                  }

                }
Editor editor = def.edit();
            editor.putInt("value", counter);
            editor.commit();
    break;

        default:
            break;
    }
    }

OriginalL'auteur amita | 2013-12-02