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
Land #3757, postgres login scanner nil public fix