Sanitize database updates/inputs

This adds data sanitization and validation to all update methods.