In the documentation of version 2.8 I found this example
{{#if (moreThan2 users)}}More than 2 users
{{ else }} Less or equal to 2 users
{{/if}}
You can try
{{#if (checkraceid raceID)}}
No spaces between {{#if
Hope this helps someone using old versions.