A type conversion function is introduced for each GObject mockup. This function does a runtime type check and generates a GoogleTest failure in case of any type error. This avoids checking GObject type twice.