Added checks for empty lists

Fixes admin messages page when messages or public content is empty.