Prevents crash when deleting user with attached avatars

When an avatar is being deleted, the user is now only accessed if present. As he may had been deleted and this was causing a crash.