Improve api and safety of SparseArray
Add runtime check for bug #124. Make sure your database is clear (e.g. by running all tests), or else it will crash the app