Compilers: return comparable NULL when missing

Otherwise code like fails_with will try to compare versions with nil,
which has bad results.

Fixes #18781.