Added method to check if nickname is valid