added try catch to the user input in Grid.cs