Why the extra check here?

And wouldn't ehlo() be a good idea to send even if there was no username?