code: public static boolean isEmptyCollectionOrMap(Object obj) {
      if (obj instanceof Collection) {
        return ((Collection) obj).isEmpty();
      }
  
      return (obj instanceof Map && ((Map) obj).isEmpty());
    }
docs: Checks is the object is a empty 'collection' or 'map'.
  
  @param obj
  the object that is checked
  @return {@code true} if the given object is a empty collection or an empty map, {@code false} otherwise