You check to make sure the type of the input is not type(x) == "string"
, which always returns false. You'll need to do type(x) ~= "string"
instead
This is because not
has a higher precedence than ==
, so it evaluates not type(x)
before type(x) == "string"
Also, your remote examples are incorrect. Remote calling syntax is remote.call("interface-name", "function-name", ...)