added check for empty language before minimization