title: Type mismatch: inferred type is String but Charset was expected in kotlin
body: <p>I have the following code in my main activity:</p>
  
  <pre><code>var qNa_list = parseQuestions(loadJSONFromAsset("qna_list.json"))
  
  
  fun loadJSONFromAsset(file_name:String): String? {
      var json: String? = null
      try {
  
          val isis = assets.open(file_name)
  
          val size = isis.available()
  
          val buffer = ByteArray(size)
  
          isis.read(buffer)
  
          isis.close()
  
          json = String(buffer, "UTF-8")
  
  
      } catch (ex: IOException) {
          ex.printStackTrace()
          return null
      }
  
      return json
  
  }
  </code></pre>
  
  <p>When I try to compile it I get the following error.</p>
  
  <p>I fixed some other errors caused due to nullables, but this one is something I'm unable to decode.</p>
  
  <p>Error:(127, 35) Type mismatch: inferred type is String but Charset was expected</p>
  
  <p>I have changed some of the values to nullable to accomidate for the errors, but the <code>json = String(buffer, "UTF-8")</code> (UTF-8) is always underlined in red.</p>