The clause _ -> IO.puts "Both parameters are not strings" is only matching on a single parameter when two are expected. Therefore more likely you should be using _, _ -> IO.puts "Both parameters are not strings".
BTW, if you are checking for strings, as in bytes, then is_binary/1 is the better guard to use. It won’t guarantee the parameter is a valid UTF8 string, but it will check that it is a a group of bytes. A bitstring is any number of bits.


















