title: Kotlin: How to check if enum contains a given String without messing with Exceptions?
body: <p>Why there is no <code>contains</code> method in enum classes (as well as in Java)? And how to implement it elegantly? Now I'm using this ugly approach:</p>
  
  <pre><code>val contains: Boolean = 
      try {
          MyEnum.valueOf("some string")
          true
      } catch (e: IllegalArgumentException) {
          false
      }
  </code></pre>