fixed small error checking missing in createViolationsFromXml: (xml).

My dev console was filled of "cannot check property xml.checkstyle of null" every time I was saving or opening a file.
This small fix should solve the issue.