hide widget when not found
@peterhashair did you check what happens if you e.g. create a dashboard for a site, that has goals created, add one of the goals widgets and switch to another site, that has no goals created. Afterwards you perform any action on the dashboard so the layout is saved. Is the goals widget then removed when switching back to the site where a goal actually exists?
As far as I remember is the dashboard layout build based on the html elements on the dashboard. So really removing something should remove it from the layout as well. Not sure if that is always wanted. Might possibly be better to only "hide" them, so they aren't removed from the layout.