Prevent blank database names

Prevent issue https://github.com/influxdb/influxdb/issues/812 from re-occurring.
Sounds good, let me tweak the patch.