Closable alerts!

The validation also works now. I forgot that "blank strings" in a JSON
object are never initialized, so you have to check them against `null`.