final cleanup for PEM serialization

final cleanup originally started by #1564 
It looks like the other instance of this test doesn't actually have these assertions, it just has the `isinstacne` once. Can we save those?