Deletes an object given a key