Gracefully handling invalid content