+ const v = toValueOrNull(value)
+
+ if (v === null || v === undefined) return v
+ if (typeof v === 'number') return v
+
+ return validator.toInt('' + v)
+}
+
+function toBooleanOrNull (value: any) {
+ const v = toValueOrNull(value)
+
+ if (v === null || v === undefined) return v
+ if (typeof v === 'boolean') return v