code: public static Predicate<HandlerInput> slotValue(String slotName, String slotValue) {
          return i -> i.getRequestEnvelope().getRequest() instanceof IntentRequest
                  && ((IntentRequest) i.getRequestEnvelope().getRequest()).getIntent().getSlots() != null
                  && ((IntentRequest) i.getRequestEnvelope().getRequest()).getIntent().getSlots().containsKey(slotName)
                  && slotValue.equals(((IntentRequest) i.getRequestEnvelope().getRequest()).getIntent().getSlots().get(slotName).getValue());
      }
docs: Returns a predicate that returns to true if the incoming request is an {@link IntentRequest}
  and contains the given slot name and value.
  @param slotName expected intent slot name
  @param slotValue expected intent slot value
  @return true if the incoming request is an {@link IntentRequest} and contains the given slot name and value