Something like: if (type letter in the textfield) {
}
would be something along these lines.
if(textfield != ""){ }