[PATCH v2 03/35] util: typedparam: Convert VIR_TYPED_PARAM_CHECK_TYPE into a function