Add null check for database in HS2 MetadataOp

It is possible the database was dropped between the call to getDbNames() and
getDb(dbName) causing a NPE.

Change-Id: Icc4d0f5c54995783dd59d73f2db3050369a6f944
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4343
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 7a4e9f0f36ef7c59acb5a32d551a84da9cc08913)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4357
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Tested-by: Lenni Kuff <lskuff@cloudera.com>