@CanIgnoreReturnValue
  public static SecretKeyAccess requireAccess(@Nullable SecretKeyAccess access)
      throws GeneralSecurityException {
    if (access == null) {
      throw new GeneralSecurityException("SecretKeyAccess is required");
    }
    return access;
  }
Throws an exception if the passed in {@link SecretKeyAccess} is null, otherwise returns it.

<p>Note: Tink has two types of APIs, some which take a nullable {@code SecretKeyAccess}, and
some which take a {@code SecretKeyAccess} without annotation. When an API takes a nullable
{@code SecretKeyAccess}, this indicates that proper usage may call it with {@code null}, hence
we typically want to throw a checked exception and {@code requireAccess} here is appropriate.
Conversely, if an API takes an unannotated {@code SecretKeyAccess}, this indicates that the API
always requires a non-null object. In this case, using it with null warrants should usually
throw a null pointer exception (and one does not want to use {@code requireAccess}).
java_src/src/main/java/com/google/crypto/tink/SecretKeyAccess.java