Tiny code simplification.
Add a null check.
Catch exceptions when creating tables.