Converts a JavaScript value to a Dart string.
Returns def when the value cannot be converted to a string.
def
String toDartString([String def = '']) => toNullableString() ?? def;