Fix for creating dialog windows without parents.

The GTK documentation supports creating a message dialog with no parent ([link](https://developer.gnome.org/gtk3/3.8/GtkMessageDialog.html#gtk-message-dialog-new)), but currently, calling `gtk.MessageDialogNew(nil, ...)` will fail with a segfault. This pull requests adds a check for a nil value before calling `toWindow()` on the parent window parameter.