title: ClassTag.runtimeClass.isInstance does not work for AnyVal
body: <p>Working with scala ClassTags I have seen that classTag.runtimeClass.isInstance doesn't work properly when you use it with AnyVal objects. Here is a snippet where you can test it. Any ideas to make this work for AnyVal objects?</p>
  
  <pre><code>import scala.reflect.ClassTag
  import scala.reflect.runtime.{universe =&gt; ru}
  object Test {
    def extractField[U: ru.TypeTag](json: Map[String, Any], field: String)(implicit classTag: ClassTag[U]): Option[U] = {
      json.get(field) match {
        case Some(value) =&gt;
          if(classTag.runtimeClass.isInstance(value))
            Some(value.asInstanceOf[U])
          else {
            None
          }
        case _ =&gt;
          None
      }
    }
    val map: Map[String,Any] = Map("k1" -&gt; 2.0, "k2" -&gt; "v")
    extractField[Double](map,"k1") // RETURNS NONE
    extractField[String](map,"k2") // RETURNS Some("v")
  }
  </code></pre>
  
  <p>BTW I am working with Scala 2.10</p>