title: 'String?' can not convert to 'String' in dart
body: <p>A value of type 'String?' can't be assigned to a variable of type 'String'.
  Try changing the type of the variable, or casting the right-hand type to 'String'.
  This error message i got when i run this code.</p>
  <p>This is a simple user input code on dart.</p>
  <pre><code>    var person = ['abc', 'qwe', 'dfg'];
      stdout.write('Enter Index : ');
      String p = stdin.readLineSync(); //Error
      int per = int.parse(p);
  
      per &gt; person.length
        ? stderr.write('Index does not exist')
        : stdout.write('Person ${person[per]}');
      }
  </code></pre>