code: public Optional<Branch> getOptionalBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
          try {
              return (Optional.ofNullable(getBranch(projectIdOrPath, branchName)));
          } catch (GitLabApiException glae) {
              return (GitLabApi.createOptionalFromException(glae));
          }
      }
docs: Get an Optional instance with the value for the specific repository branch.
  
  <pre><code>GitLab Endpoint: GET /projects/:id/repository/branches/:branch</code></pre>
  
  @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
  @param branchName the name of the branch to get
  @return an Optional instance with the info for the specified project ID/branch name pair as the value
  @throws GitLabApiException if any exception occurs