In the example below pine script converts str.tonumber('15min') correctly to 15.00 as it should. However if we provide the argument as a function parameter it fails to convert. Bug has been reported.
//@version=5
indicator("My script", "m", true)
convert() =>
foo = '15min'
str.tostring(str.tonumber(foo))
convert(simple string foo) => str.tostring(str.tonumber(foo))
if barstate.islast
label.new(bar_index, high * 1.001, 'Correct result: ' + convert()) // result correctly 15
foo = '15min'
label.new(bar_index, high, 'Inconsistent result: ' + convert(foo)) // result NaN