check for existence of private key before using it