code: @NullSafe
    public static Throwable getCauseOfInvocationTargetException(Throwable throwable) {
      return (throwable instanceof InvocationTargetException ? throwable.getCause() : throwable);
    }
docs: Returns the underlying cause of the given {@link Throwable} object if the {@link Throwable} object
  is an instance of {@link InvocationTargetException}.  An {@link InvocationTargetException} is typically thrown
  when a method on some object is invoked reflectively.
  
  @param throwable {@link Throwable} object to evaluate as a {@link InvocationTargetException}.
  @return a {@link Throwable} object indicating the underlying cause of {@code throwable} if {@code throwable} is an instance
  of {@link InvocationTargetException} otherwise return {@code throwable}.
  @see java.lang.reflect.InvocationTargetException
  @see java.lang.Throwable#getCause()