Update tabletop.js

Add condition to check is cell is undefined.
Bug happened when cells are empty.