turn nil publics and privates into blanks

don't pass nil into the credential object, pass an empty string instead
this is the expected behaviour and avoids stack traces

see ticket for verification steps