Fix some NPEs
Fix filtering resource pages and external activities by cohort.

Apparently investigations/activities don't support cohorts
right now?