fix: checking type of JSONValue for inside of a documents