improve string
Optimize potentially expensive call to hasChildren

if not needed (no {{children}} identifier in template nor used in nav condition)
fix callable syntax
possibly improve performance

• by calling hasChildrenImpl first and prepareChildren() only if not false