added textbox error checking
added error checking to the textbox