gdk3 test: check whether valid object instead of not raising an exception