title: Android check if a View has a tag
body: <p>Is there any way to check if a view has a tag?</p>
  
  <p>I have two views to differentiate from and currently I'm using the tag. I have checked <a href="http://developer.android.com/reference/android/view/View.html" rel="nofollow">http://developer.android.com/reference/android/view/View.html</a> for all methods involving tags and have not found any way to check if a tag exists.</p>
  
  <p>So currently I'm using :</p>
  
  <pre><code>if(null == v.getTag(R.string.tagid)){
      // do stuff
  }
  </code></pre>
  
  <p>But I try to avoid null checking as far as possible and I'm just wondering if there is a way to check if the view has a tag or if there's a different way to differentiate between two views(I don't have a id to compare to so I can't use the id).</p>