Only try to get packages from the db if the selection isn't an empty string.