check function exists