Query activity instances.
Activity type name to filter by; queries all activities if null.
a function from SerializedValue to an inner payload type