Add some checks to prevent empty tags being inserted in the database. Also added database upgrade fix to remove any existing empty tags. This fixes #10 in which an empty tag caused the application to crash.