Add estimate_type() to estimate value type
Fix to use Datum structure of version 0.5 API