turn target runtime check of mtd into a compile-time check