Protected against the possibility that an xml was provided with no username.