Check for str or unicode for the cert/key fields