Removing object that's undefined