How to test for no text in an input field

I’ve never actually tried to work in Input field before haha.

BE AWARE: This is a noob question :] I’m learning, still.

All i need to do is when a button is pressed, make sure there is text inside of the input field. If there isn’t, declare the log-in to be false.

Here’s what I have so far.

var loginUser:String;
var loginPass:String;
var loginAccepted:Boolean;

heroName.restrict = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

Login.addEventListener(MouseEvent.CLICK, checkLogin);
function checkLogin(e:MouseEvent){
	loginUser = heroName.text;
	
	
	trace(loginUser);
}