Throw serialization errors for functions.