removed isDocument check since this seems to have disappeared in latest Docpad v6.46.5