On the EJS github page, there is one and only one simple example: https://github.com/visionmedia/ejs
Example
<% if (user) { %> &
You can use this trick :
user.name // stops code execution,if user is undefined (scope.user||0).name // === undefined
where scope is parent object of user