Fix bug in case username nil in iOs

Fix bug in case username nil in iOs