Automatic persistence: detect which types cannot be properly persisted and skip them

Seems related -