Handle nil values better.

In several cases virtualserver wasn't protecting against nil values
properly and then failed, assuming it could .each a nil.