Try to catch the NullPointerException in the DAO