(optional) and (nullable) annotations are available since gobject-introspection 1.42, which is old enough for us to depend on now. We should replace our uses of (allow-none) with one or the other, as appropriate.