@Nullable
  public static PyType toNonWeakType(@Nullable PyType type) {
    return type instanceof PyUnionType ? ((PyUnionType)type).excludeNull() : type;
  }
@Nullable
  public static PyType toNonWeakType(@Nullable PyType type)