code: @SuppressWarnings({"unchecked", "unused"})
      public <T> T get(String key, Class<T> type) {
          try {
              return (T) state.get(key);
          } catch (ClassCastException cce) {
              return null;
          }
      }
docs: This get method will return the value if its type matches the type parameter
  
  @param key  to lookup
  @param type the expected type of the value
  @return null if the key does not exist or the type is incorrect