Added a check for non existing Notes in DB.getNote(id)