This is already checked for by the gnome.generate_gir() call. https://bugzilla.gnome.org/show_bug.cgi?id=790385