Input Error Handling

Try-catch blocks added for several input methods to prevent runtime
errors.