Every simple variable type supports type conversion by invoking the constructor of the type.
int
Available for uint8, uint16, uint32/uint, uint64, int8, int16, int32/int and int64. When the conversion to an int fails, an exception is thrown.
Example
int("22") //is being converted to 22int(1.5) //exception is thrownint(true) //is being converted to 1
string
The string constructor accepts every type except for protos. Objects and structs are converted into JSON, other simple types are just being converted into strings (like with toString).