Another check_function implementation