title: Dart: How to check if List of Objects is a List of Strings/ints/bools
body: <p>For simple data types, you can use e.g.</p>
  <pre><code>object is String
  </code></pre>
  <p>to check whether an Object variable is of a more specific type.</p>
  <p>But let's you have a List, but want to check if it is a List of Strings. Intuitively we might try</p>
  <pre><code>List list = ['string', 'other string'];
  print(list is List&lt;String&gt;);
  </code></pre>
  <p>which returns false.</p>
  <p>Similarly using the List.cast() method doesn't help, it will always succeed and only throw an error later on when using the list.</p>
  <p>We could iterate over the entire list and check the type of each individual entry, but I was hoping there might be a better way.</p>