### Godot version

4.2.dev3.official

### System information

Windows 10 - GLES3 (Compatibility)

### Issue description

When using the SpinBox node, it is possible for a user to input `NAN` into it (by clicking it and writing "NAN" as text).

I believe this should either be prevented (for example with an `allow_nan` property), or [documented](https://docs.godotengine.org/en/latest/classes/class_spinbox.html), as developers might not know that they should be checking the SpinBox's value against it.

![image](https://github.com/godotengine/godot/assets/141344817/ba1455e2-36b8-45f1-940d-32b9da92f1c4)


### Steps to reproduce

0. Create a new project.
1. Add a SpinBox node.
2. Run the project.
3. Click the SpinBox.
4. Type "NAN".
5. Press enter.

### Minimal reproduction project

[SpinBox NAN - MPR.zip](https://github.com/godotengine/godot/files/12448902/SpinBox.NAN.-.MPR.zip)

return shared->min;
}
double Range::get_max() const {
	return shared->max;
}
double Range::get_step() const {
	return shared->step;
}
double Range::get_page() const {
	return shared->page;
}
void Range::set_as_ratio(double p_value) {
	double v;
	if (shared->exp_ratio && get_min() >= 0) {
		double exp_min = get_min() == 0 ? 0.0 : Math::log(get_min()) / Math::log((double)2);
		double exp_max = Math::log(get_max()) / Math::log((double)2);
		v = Math::pow(2, exp_min + (exp_max - exp_min) * p_value);
	} else {
		double percent = (get_max() - get_min()) * p_value;
		if (get_step() > 0) {
			double steps = round(percent / get_step());
			v = steps * get_step() + get_min();
		} else {
			v = percent + get_min();
		}
	}
	v = CLAMP(v, get_min(), get_max());
	set_value(v);
}
double Range::get_as_ratio() const {