code: public static void checkFloatNotNaNOrInfinity(String parameterName,
              float data) {
          if (Float.isNaN(data) || Float.isInfinite(data)) {
              throw Exceptions.IllegalArgument(
                      "%s should never be NaN or Infinite.", parameterName);
          }
      }
docs: In common shader cases, NaN makes little sense. Correspondingly, GVRF is
  going to use Float.NaN as illegal flag in many cases. Therefore, we need
  a function to check if there is any setX that is using NaN as input.
  
  @param parameterName
  The name of the user-supplied parameter that we are validating
  so that the user can easily find the error in their code.
  @param data
  A single float data.
  @throws IllegalArgumentException
  if the data includes NaN.