changing variable type from Text to Numeric

Hi,
does anyone know if I can change variable type from text to numeric?

I’ve encountered an issue where if the font weight is defined in variables as text (e.g.: Bold, Semibold, …) dev mode doesn’t see if as a variable but rather a static value.
For dev mode to work it needs to me set as a numeric value (e.g.: for Bold the value would be 700, …)

I was wondering if I could somehow change the type of variable instead of doing it manually?
Thank you!