Safely detecting presence of 12v applied via exposed terminals for use with microcontroller
This would probably work, but to be on the safe side, I'd use an optocoupler, or a similar electrical isolation device in place of using a single MOSFET. The problem is the GD capacitance of the MOSFET, which, if in a case of a high frequency gate voltage rise may result in a transient voltage rise on the microcontroller pin before this parasitic capacitor has a chance to charge up. 

Using a series resistor to the gate will only make the gate capacitor charge slower, so I'd drop it completely. With a FET device, you almost never need a series resistor, since the gate is not composed of a diode which you need to protect from drawing too much current, as in a bipolar device. The size of the pullup resistor will dictate how fast the parasitic capacitance will charge, so choosing it to be as small as possible seems like a good option, but it'll increase the static power consumption of your circuit considerably.