Fixed rare errors.

Consider possibility of nil or NULL being a value in the tables returned
from util.FindInSphere, util.FindInBox, and ents.GetAll.