Exception added for invalid input