Fix non object error when invoice id is not valid