Handle case when data has no details key

Some pages on GOV.UK return JSON that doesn't have the `details` key. In that case the JavaScript would error and not show the alert.