Add check for non-existent table. Fixes #44