More user-friendly API error messages

There is a difference between exceptions that are caused by errors
in the code (e.g. passing a non-string to a method that requires a
string) and exceptions that are caused by the user input. These
messages should be user-friendly and not repeat some internal
implementation details.

I also removed the repeated value from one message. It just repeated
the value and did not provided additional information.