These functions take care of type conversion and check that the parameters contain legal values. The API now returns a Bad Request error if the format is wrong.