code: @SuppressWarnings("unchecked")
      private <T> Optional<T> getValue(Object object, Supplier<Object> method, WaveItem<T> waveItem) {
  
          T source = null;
          if (ClassUtility.getClassFromType(waveItem.type()).isInstance(method.get())) {
              source = (T) method.get();
          } else {
              if (CoreParameters.DEVELOPER_MODE.get()) {
                  throw new CoreRuntimeException("Cannot cast object " + method.get() + " to " + waveItem.type().toString());
              }
          }
          return Optional.ofNullable(source);
      }
docs: Gets the value.
  
  @param object the object
  @param method the method
  @param waveItem the wave item
  
  @return the value
  
  @param <T> the generic type