code: protected static void validateNumerical(String opName, SDVariable v) {
          if (v == null)
              return;
          if (v.dataType() == DataType.BOOL || v.dataType() == DataType.UTF8)
              throw new IllegalStateException("Cannot apply operation \"" + opName + "\" to variable \"" + v.getVarName() + "\" with non-numerical data type " + v.dataType());
      }
docs: Validate that the operation is being applied on a numerical SDVariable (not boolean or utf8).
  Some operations (such as sum, norm2, add(Number) etc don't make sense when applied to boolean/utf8 arrays
  
  @param opName Operation name to print in the exception
  @param v      Variable to perform operation on