pyldb: Add tests for type errors