Check for null before deleting survey