add check for quadratic objective