Fixing join/lookup issue

Fixing refactor from containsKey to has, and checking for has key in
join before returning an array.