Check if otu.metadata_hash.keys not nil before calling each

Fixes 192
Merge pull request #194 from NESCent/fix-nil-keys-search

Check if otu.metadata_hash not nil before calling each