Which Image is attached with ImageView?

if(myImageView.getDrawable() == null) {
    return false;
}
else {
    return true;
}

This tells if an image is attached with ImageView or not. I want to compare the Image which is residing in Drawable and Image which attached with ImageView.