Added check for missing object, per #5.