'Only return tokens for strings and None (which is null in JSON)
:see: https://github.com/andresriancho/w3af/issues/12000'

def token_filter(self, token_path, token_value):

    if (token_value is None):
        return True
    if isinstance(token_value, basestring):
        return True
    return False
