boolean operator in checkInput() from || to &&