if (tile != myMap.getNullTile()) {
if (myMap == null || tile != myMap.getNullTile()) {
    public void mergeOnto(MapLayer other) {        if(!other.canEdit())            return;        for (int y = bounds.y; y < bounds.y + bounds.height; y++) {            for (int x = bounds.x; x < bounds.x + bounds.width; x++) {                Tile tile = getTileAt(x, y);                if (tile != myMap.getNullTile()) {                    ((TileLayer)other).setTileAt(x, y, tile);                }            }        }    }