typecheck on db_put