Returns true if the primitive contains JSONObject (dictionary)
If the primitive is a Object then you can safely type cast the primitive into JSONObject object.
JSONPrimitive Class