Throw an error when trying to invoke a non-function