Check to see if function exists before calling it.