def METHOD_NAME(name, formatt, shell):
    """Check if the input file exists"""
    if formatt == "raster":
        typ = "Raster"
        inp = grass.find_file(name)
    elif formatt == "vector":
        typ = "Vector"
        inp = grass.find_file(name, formatt)
    if inp["name"] == "":
        if shell:
            grass.message(0)
            return
        else:
            grass.fatal(_("%s %s does not exists" % (typ, name)))
    else:
        return inp