The documentation states these methods can return NULL on error, the GIR documentation should reflect that.