Check for a certificate before trying to use it