@Contract("null -> null")
  public static Method getMethod(@Nullable Location location) {
    if (location == null) {
      return null;
    }
    try {
      return location.method();
    }
    catch (IllegalArgumentException e) { // Invalid method id
      LOG.info(e);
    }
    return null;
  }
@Contract("null -> null")
  public static Method getMethod(@Nullable Location location)