Modified isXML and isJSON to perform case insensitive content-type check

Added .toLowerCase() to the isJSON and isXML methods to perform case insensitive content-type checking.

It seems as though the latest version had a number of lines with trailing spaces.  My Sublime Text has a setting to trim trailing spaces on save.  Sorry for all the unecssary lines in the patch.  The only changes to review are lines 285 and 294.