Converts to not-nullable list
static List<T> toList<T>(dynamic d, List<T> def) { return toListN(d) ?? def; }