Use custom MethodFormat to prevent uncaught NullpointerException.