Fixing broken code

The code wasn't checking for null values for KRN and SPSiteUrl. Created
a new method to check the value is not null before retrieving the value,
otherwise, it returns an empty string.
Remove CID from the JSON.