Fix the bug of RubyHash#key while encountering null objects