Small check to prevent memory leak when inserting elements into objects.