Wrong error message when having nonlinear matrix objectives
Check for complex objectives when having matrix objective