The code has an implicit type conversion that may fail at runtime. This means that some string values do not have an obvious analogue as a number or Boolean.
Using explicit type conversions, which allow for lossy conversions, makes code more reliable and much less likely to fail at runtime.
To correct this error
Make sure that the string provided is compatible with the data type to which it is converted.
Use explicit type conversion when converting data from one type to another.