Check to make sure it is HASH before key look up

Need to make sure it is HASH before treating it as HASH