Added check for empty text field in the dialog for adding text layers