NullPointerException in TableQuery.fetchMetadata() (#11403)

Trivial patch. The finally block lacks a check for null before
attempting to invoke table.close()

Change-Id: Ib32f1d75fef4bd442652ca60a2b7df6aa45d7fa7