Creates an error object and throw it if the provided value is a string, otherwise throws the provided error object.
Creates an error object and throw it if the provided value is a string, otherwise throws the provided error object.