Sanitize method added to create object middleware