Sanitize database inputs