prevent empty dialog