Convert any dynamic value to int or fallback safely.
fallback
int toInt(value, {int fallback = 0}) { return toIntOrNull(value) ?? fallback; }