In the verify_versions.js helper file, we have a function getBinVersion() that will run the serverStatus command on the calling node and return the binary version field from the result object. However, if this command fails, the function will return null, as the result object won't contain a version field on failure. We should wrap the serverStatus in an assert.commandWorked() call so that we catch this failure before the function returns.
The function returning null can have larger downstream impacts. For example, we sometimes pass the result of getBinVersion() to another jstest helper getBinVersionFor(). Here is an example. In the getBinVersionFor() implementation, if null is passed in as the version, we automatically default the version to latest.
The following scenario can occur: if we have two nodes, one in last-lts and one in latest, and we call getBinVersion() on the the last-lts and the serverStatus command fails, we will return null. If this null result is passed in to the getBinVersionFor() function, it will return the bin version of the node as latest. Thus, if we are checking for binary version equality using a function like areBinVersionsTheSame(), we will get true for the last-lts and latest node.