Validate slugs before calling content API

This should prevent some of the exceptions we're seeing at the moment.