leaks: Fix SIGSEGV detecting object type.
G_IS_OBJECT & GST_IS_OBJECT work by following pointers which is unsafe on certain architectures. GstMiniObject detection however does a lookup to see if it's a valid type derived from G_TYPE_BOXED. Part-of: <gstreamer/gstreamer!791>