implements check from templatetag fixed