Update parser.js

better checking on empty style pairs