Avoid throwing an exception to handle validation errors