verify array not empty before check

Logged in users may be visiting frontend of sites (on multisite) for which they have no role.