Check dialog first.