Make sure the username field exists before casting to lowerCase