Added error handling for invalid numbers and operations