Paste this into try-dart: 

```dart
bool toBool(x) {
  if (x is bool) return x;
  if (x is num) return x != 0;
  return false;
}

void main() {
   print(toBool({}));
   print(toBool([]));
}
```

`toBool` only looks at numbers and booleans. So truthy and toBool are quite different.