fix an exception at startup

Fix an issue casting `Null` to `bool` at startup.

@dinhviethoa