Asserts that value exists and is an integer and returns it.
Note that which values count as integers varies between the Dart VM and
dart2js. The value
1.0 will be considered an integer under dart2js but
not under the VM.
int get asInt => _getTyped('an integer', (value) => value is int);