title: Int cannot be cast as String issue at runtime
body: <p>Running my code results in the following error: <code>java.lang.Integer cannot be cast to java.lang.String</code></p>
  
  <p>This is what I have:</p>
  
  <pre><code>for(Map&lt;String, Object&gt; record: list) {
      if(((String)record.get("level")).equals("1")) {
          rootList.add(record);
      }
  }
  </code></pre>
  
  <p>I have tried converting that little snippet to an Int using toString but it just gives me a compiling error. I'm new to java (and I did not write this code either) so forgive me if it's a stupid mistake. </p>