code: @Nullable
      @SuppressWarnings("unchecked") // Bundle#getSerializable(String) returns Serializable object so it is safe to cast to a type which extends Serializable.
      public static <T extends Serializable> T optSerializable(@Nullable Bundle bundle, @Nullable String key) {
          return optSerializable(bundle, key, null);
      }
docs: Returns a optional {@link java.io.Serializable}. In other words, returns the value mapped by key if it exists and is a {@link java.io.Serializable}.
  The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null.
  @param bundle a bundle. If the bundle is null, this method will return null.
  @param key a key for the value.
  @return a {@link java.io.Serializable} {@link java.util.ArrayList} value if exists, null otherwise.
  @see android.os.Bundle#getSerializable(String)