they crash with a null object reference when no style object is given cause it tries to do style.fontName when setting the font should do a check on the object before passing it through. If no object is given just passing null is fine.
Right now it isn't evident under what license this project is being developed and published. Please add a LICENSE file to this repository, so others know if and how code from here can be reused elsewhere.