Re-add the module null check that crashes the preview/config screens.

Originally added by @flo in #1279