Your syntax is just a bit off, you had a closing ) after IsDocumentOnSelectedPath(), and not one after the "active"
<li class="nav-item <%# IfTrue(IsDocumentOnSelectedPath(),"active") %>"><%# Eval("MenuItemName") %> <cms:SubLevelPlaceHolder runat="server" Id="plcSub" />
I would look at text/xml Transformations so you can use Macros as well, the nice thing about macros is they give you some 'intellisense' so you can get a little more info on the objects available and stuff.