mtree: safety checks for column types and values

- following the report FS#412 by adeel