Check if the data is JSON encoded or not.

Previously I had gone through the function to create a slug from the given string. Today, I came up with a problem.…