Check if basic types are read from object.di before usage.

If object.di was not read or is incomplete then basic types may be missing.
This results in a crash if they are used during runtime initialization.
This fixes #551.