Fix g_param_is_valid for GParam

The is_valid vfunc need to return the same
condition that the validate vfunc uses to
determine whether to 'fix' the value.

param_param_validate is considering NULL to
be a valid value, so param_param_is_valid needs
to do the same.

Fixes: #8576
diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
index f17b348..c3e4e44 100644
--- a/gobject/gparamspecs.c
+++ b/gobject/gparamspecs.c
@@ -894,7 +894,7 @@
 {
   GParamSpec *param = value->data[0].v_pointer;
 
-  return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
+  return !param || g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
 }
 
 static gboolean