Improve checking unique nickname function