backport exception for invalid JSONKeyPathsByPropertyKey

This ports a part of #325 back to master, to address #331.
you can directly compare `value != NSNull` here