Add function _get_field_type to get the field type based on field name
Add switch for sanitize field based on type