Issue #1623534 by jayaram: Modified how we get the language of for a dummy form so that it will not cause a notice for some entities.