code: public <W> W getValue(Class<W> clazz, String key) {
          if (values.get(key) == null) {
              return null;
          } else {
              try {
                  return (W) values.get(key);
              } catch (ClassCastException e) {
                  if (Number.class.isAssignableFrom(clazz)) {
                      try {
                          return (W) Utils.castNumberType(values.get(key), clazz);
                      } catch (ClassCastException e1) {
                          return null;
                      }
                  } else {
                      throw e;
                  }
  
              }
  
          }
      }
docs: Returns the cell value casted to the specified class.
  
  @param clazz the expected class
  @param key   the key
  @return the cell value casted to the specified class