Error !

AttributeError: 'NoneType' object has no attribute 'val'

<figcaption> <p>${object.val('mainimage.text')}</p> % if image.val('author') or image.val('author-en'): ${ i18n('site-Fotograf', lang=object.language()) }: %if lang == 'en': ${image.val('author-en') or image.val('author')} %else: ${image.val('author')}
templates/imr/functions/partials, line 431:
% if image.val('author') or image.val('author-en'):
templates/imr/news-article, line 37:
${partials.renderMainImageWidthFigcaption(object)}
templates/imr/site, line 68:
/var/limecms/hi/lib/python2.7/site-packages/Mako-1.0.7-py2.7.egg/mako/runtime.py, line 899:
callable_(context, *args, **kwargs)
/var/limecms/hi/lib/python2.7/site-packages/Mako-1.0.7-py2.7.egg/mako/runtime.py, line 873:
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
/var/limecms/hi/lib/python2.7/site-packages/Mako-1.0.7-py2.7.egg/mako/runtime.py, line 838:
**_kwargs_for_callable(callable_, data))
/var/limecms/hi/lib/python2.7/site-packages/Mako-1.0.7-py2.7.egg/mako/template.py, line 462:
return runtime._render(self, self.callable_, args, data)
/var/limecms/hi/hi-inst-04/Products/LimeTemplate/LimeTemplate.py, line 704:
html = mytemplate.render(object=object, site=site, request=self.REQUEST, extra=extra.get('kwargs', None), **extra)