Fix quota error formatting in case of NoneType