Added checkString() method for checking Javascript syntax.