added error  handling to EditText