Correctly check whether functions are available or not