Check hash for key directly instead of using key array