Fix segfault in serialization

I attempted to serialize non-existant tiles.