[os_xml] set some function parameters to nonnull and ensure they are when called