Guard against falsey versions value.

Already done on [L86](https://github.com/isaacs/npm/blob/b8db927278023c68ec1fa82895390d2491dfc554/lib/search.js#L86)