If no global scaling factor has been set, we currently segfault when called with a %NULL mode parameter, which happens when calculating the scale for the current mode while no modes are available.
Adding %NULL checks in the corresponding callers would mean that we'd have to duplicate the global scaling factor handling, so instead consider %NULL mode parameters valid and handle them gracefully.