Use try/except instead of checking the function existence