Catch invalid saltenv

Closes #16073