def add_type_restriction(step):
    """
    for a given step, look for object type and construct a SPARQL fragement to restrict the graph
    to objects of the type. If the object does not have a type restriction, return an empty string.
    :param step: The step for which an object restriction is requested
    :return: the SPARQL fragement for thr restriction, or an empty string if no type is specified
    """
    if 'type' in step['object']:
        return '?' + step['object']['name'] + ' a <' + str(step['object']['type']) + '> . '
    else:
        return ""