Get your taxes done using TurboTax

Yes your 2 scenarios are correct.  It is called a non-refundable credit.  A refundable credit you can get even if you have no tax liability on line 22 (not line 24).