public static bool IsThereNullCustomObjectInList(this SerializedProperty list)
 {
     for (int i = 0; i < list.arraySize; i++)
     {
         if (ExtObjectEditor.IsTruelyNull(list.GetArrayElementAtIndex(i).GetCustomObject()))
         {
             return(true);
         }
     }
     return(false);
 }
 /// <summary>
 /// Clean  null item (do not remove items, remove only the list)
 /// </summary>
 /// <param name="listToClean"></param>
 /// <returns>true if list changed</returns>
 public static void CleanNullFromList(SerializedProperty listToClean, ref bool hasChanged)
 {
     hasChanged = false;
     if (listToClean == null)
     {
         return;
     }
     for (int i = listToClean.arraySize - 1; i >= 0; i--)
     {
         if (ExtObjectEditor.IsTruelyNull(listToClean.GetArrayElementAtIndex(i).GetCustomObject()))
         {
             listToClean.RemoveAt(i);
             hasChanged = true;
         }
     }
 }