The maximum principle for degenerate parabolic PDEs with singularities