Added exception lauching for sqlite call that returned NULL in some cases (DB might have been corrupted).