JBIDE-18457 - prefer closest java if strictly-compatible is not available

I've added this version check for null before adding it to a pre-sort list.