Text this: An existence theorem for optimal control with nonstandard cost functionals