There are some bugs in DB API about type.

There are two bugs.
1. Date type is not saved.
2. Even the value in DB can be converted to requested type, ScriptableDocument returns undefined.