Fixed crash issues in DBHelper caused by null returned on exception.