handled unexpected error when user enter value other than integer