Check for correct function before calling it.