Non-differentiable functionals and singular sets of minima