Fixes NullPointerException in formatter()