Text this: Singularity Theory for Nonlinear Optimization Problems