Add error checking to 'numTiles' parameter.