$2 is the length you typed in, not the nickname length. But I get your point, the check is a bit useless.