fix non-terminating null value exception for join keys