Return the function pointer stored in the given slot. If the
result is NULL, this indicates that either the slot is NULL,
or that the function was called with invalid parameters.
Callers will typically cast the result pointer into the appropriate
function type.