Check if the avatar is nil and then save or not