I often have cases when a string value is absent and/or empty. Is this the best way to test this condition?
#if( $incentive.disclaimer && $!incentive
Bla bla $!incentive.disclaimer.
If $incentive.disclaimer is null or "", Velocity will render:
Bla bla .
Refer to the official Guide section: https://velocity.apache.org/engine/devel/user-guide.html#quiet-reference-notation
Most common case when you do want #if: your variable is just a part of a bigger piece of text and you don't want to show it if the variable is empty. Then you need this:
#if($incentive.disclaimer && !$incentive.disclaimer.empty)
Please read our incentive disclaimer:
$incentive.disclaimer
#end