public static @Nullable <T, S> S doIfCast(@Nullable Object obj,
                                            @NotNull Class<T> clazz,
                                            @NotNull Convertor<? super T, ? extends S> convertor) {
    //noinspection unchecked
    return clazz.isInstance(obj) ? convertor.convert((T)obj) : null;
  }
public static @Nullable <T, S> S doIfCast(@Nullable Object obj,
                                            @NotNull Class<T> clazz,
                                            @NotNull Convertor<? super T, ? extends S> convertor)